Commit 168cd381 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'enable-scss-lint-pseudo-element' into 'master'

Enable PseudoElement in scss-lint

## What does this MR do?
Enables `PseudoElement` in `.scss-lint.yml`

## Are there points in the code the reviewer needs to double check?
None

## Why was this MR needed?
Improve SCSS maintainability and consistency

## Screenshots (if relevant)
None

## Does this MR meet the acceptance criteria?

- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
#23485

See merge request !7083
parents e4990b8c d698ec0e
...@@ -143,7 +143,7 @@ linters: ...@@ -143,7 +143,7 @@ linters:
# with two colons. Pseudo-classes, like :hover and :first-child, should # with two colons. Pseudo-classes, like :hover and :first-child, should
# be declared with one colon. # be declared with one colon.
PseudoElement: PseudoElement:
enabled: false enabled: true
# Avoid qualifying elements in selectors (also known as "tag-qualifying"). # Avoid qualifying elements in selectors (also known as "tag-qualifying").
QualifyingElement: QualifyingElement:
......
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
font-size: 20px; font-size: 20px;
text-indent: 0; text-indent: 0;
&:before { &::before {
display: block; display: block;
position: relative; position: relative;
top: -2px; top: -2px;
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
background-color: transparent; background-color: transparent;
border: 0; border: 0;
.ui-icon:before { .ui-icon::before {
color: $md-link-color; color: $md-link-color;
} }
} }
...@@ -527,7 +527,7 @@ ...@@ -527,7 +527,7 @@
.ui-datepicker-prev { .ui-datepicker-prev {
left: 0; left: 0;
.ui-icon:before { .ui-icon::before {
content: '\f104'; content: '\f104';
text-align: left; text-align: left;
} }
...@@ -536,7 +536,7 @@ ...@@ -536,7 +536,7 @@
.ui-datepicker-next { .ui-datepicker-next {
right: 0; right: 0;
.ui-icon:before { .ui-icon::before {
content: '\f105'; content: '\f105';
text-align: right; text-align: right;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-bottom: 1px solid rgba(0, 0, 0, 0.05); border-bottom: 1px solid rgba(0, 0, 0, 0.05);
&:after { &::after {
content: " "; content: " ";
display: table; display: table;
clear: both; clear: both;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
.timeline { .timeline {
&:before { &::before {
background: none; background: none;
} }
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
a[href*="/uploads/"], a[href*="/uploads/"],
a[href*="storage.googleapis.com/google-code-attachments/"] { a[href*="storage.googleapis.com/google-code-attachments/"] {
&:before { &::before {
margin-right: 4px; margin-right: 4px;
font: normal normal normal 14px/1 FontAwesome; font: normal normal normal 14px/1 FontAwesome;
...@@ -158,13 +158,13 @@ ...@@ -158,13 +158,13 @@
content: "\f0c6"; content: "\f0c6";
} }
&:hover:before { &:hover::before {
text-decoration: none; text-decoration: none;
} }
} }
a.no-attachment-icon { a.no-attachment-icon {
&:before { &::before {
display: none; display: none;
} }
} }
...@@ -183,13 +183,13 @@ ...@@ -183,13 +183,13 @@
position: absolute; position: absolute;
text-decoration: none; text-decoration: none;
&:after { &::after {
content: image-url('icon_anchor.svg'); content: image-url('icon_anchor.svg');
visibility: hidden; visibility: hidden;
} }
} }
&:hover > a.anchor:after { &:hover > a.anchor::after {
visibility: visible; visibility: visible;
} }
} }
......
...@@ -94,14 +94,14 @@ ...@@ -94,14 +94,14 @@
position: relative; position: relative;
&.old { &.old {
&:before { &::before {
content: '-'; content: '-';
position: absolute; position: absolute;
} }
} }
&.new { &.new {
&:before { &::before {
content: '+'; content: '+';
position: absolute; position: absolute;
} }
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
.file-holder { .file-holder {
.diff-line-num:not(.js-unfold-bottom) { .diff-line-num:not(.js-unfold-bottom) {
a { a {
&:before { &::before {
content: attr(data-linenumber); content: attr(data-linenumber);
} }
} }
......
...@@ -474,8 +474,8 @@ ...@@ -474,8 +474,8 @@
} }
.arrow { .arrow {
&:before, &::before,
&:after { &::after {
content: ''; content: '';
display: inline-block; display: inline-block;
position: absolute; position: absolute;
...@@ -486,14 +486,14 @@ ...@@ -486,14 +486,14 @@
top: 18px; top: 18px;
} }
&:before { &::before {
left: -5px; left: -5px;
margin-top: -6px; margin-top: -6px;
border-width: 7px 5px 7px 0; border-width: 7px 5px 7px 0;
border-right-color: $border-color; border-right-color: $border-color;
} }
&:after { &::after {
left: -4px; left: -4px;
margin-top: -9px; margin-top: -9px;
border-width: 10px 7px 10px 0; border-width: 10px 7px 10px 0;
......
...@@ -77,14 +77,14 @@ ...@@ -77,14 +77,14 @@
// Middle dot divider between each element in a list of items. // Middle dot divider between each element in a list of items.
.middle-dot-divider { .middle-dot-divider {
&:after { &::after {
content: "\00B7"; // Middle Dot content: "\00B7"; // Middle Dot
padding: 0 6px; padding: 0 6px;
font-weight: bold; font-weight: bold;
} }
&:last-child { &:last-child {
&:after { &::after {
content: ""; content: "";
padding: 0; padding: 0;
} }
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
margin-left: 4px; margin-left: 4px;
.arrow { .arrow {
&:before { &::before {
content: ''; content: '';
display: inline-block; display: inline-block;
position: absolute; position: absolute;
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
pointer-events: none; pointer-events: none;
} }
&:after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
width: 0; width: 0;
...@@ -351,7 +351,7 @@ a.deploy-project-label { ...@@ -351,7 +351,7 @@ a.deploy-project-label {
line-height: 36px; line-height: 36px;
margin: 0; margin: 0;
> li + li:before { > li + li::before {
padding: 0 3px; padding: 0 3px;
color: #999; color: #999;
} }
...@@ -790,7 +790,7 @@ pre.light-well { ...@@ -790,7 +790,7 @@ pre.light-well {
top: 7px; top: 7px;
color: $location-icon-color; color: $location-icon-color;
&:before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
top: 0; top: 0;
color: $location-icon-color; color: $location-icon-color;
&:before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.example { .example {
&:before { &::before {
content: "Example"; content: "Example";
color: #bbb; color: #bbb;
} }
......
...@@ -35,7 +35,7 @@ nav.navbar-collapse.collapse, ...@@ -35,7 +35,7 @@ nav.navbar-collapse.collapse,
.nav, .nav,
.btn, .btn,
ul.notes-form, ul.notes-form,
.merge-request-ci-status .ci-status-link:after, .merge-request-ci-status .ci-status-link::after,
.issuable-gutter-toggle, .issuable-gutter-toggle,
.gutter-toggle, .gutter-toggle,
.issuable-details .content-block-small, .issuable-details .content-block-small,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment