Commit 3b93574a authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'enable-scss-lint-single-line-per-selector' into 'master'

Enable SingleLinePerSelector in scss-lint

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

## Are there points in the code the reviewer needs to double check?
This MR touches a lot of files, just need another pair of eyes to look through and make sure I didn't break anything.

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

## Screenshots (if relevant)
None

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [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 !7081
parents 9a677038 791c9d0d
......@@ -172,7 +172,7 @@ linters:
# Split selectors onto separate lines after each comma, and have each
# individual selector occupy a single line.
SingleLinePerSelector:
enabled: false
enabled: true
# Commas in lists should be followed by a space.
SpaceAfterComma:
......
......@@ -37,7 +37,8 @@
}
@include keyframes(pulse) {
from, to {
from,
to {
@include webkit-prefix(transform, scale3d(1, 1, 1));
}
......
......@@ -128,7 +128,8 @@
position: relative;
.avatar-holder {
.avatar, .identicon {
.avatar,
.identicon {
margin: 0 auto;
float: none;
}
......
......@@ -213,7 +213,8 @@
top: 2px;
}
svg, .fa {
svg,
.fa {
&:not(:last-child) {
margin-right: 3px;
}
......
......@@ -143,7 +143,8 @@ li.note {
}
}
.wiki_content code, .readme code {
.wiki_content code,
.readme code {
background-color: inherit;
}
......@@ -350,7 +351,8 @@ table {
margin-right: 10px;
}
.alert, .progress {
.alert,
.progress {
margin-bottom: $gl-padding;
}
......
......@@ -275,7 +275,8 @@
a {
padding-left: 25px;
&.is-indeterminate, &.is-active {
&.is-indeterminate,
&.is-active {
&::before {
position: absolute;
left: 5px;
......@@ -373,7 +374,8 @@
}
}
.dropdown-input-field, .default-dropdown-input {
.dropdown-input-field,
.default-dropdown-input {
width: 100%;
min-height: 30px;
padding: 0 7px;
......
......@@ -18,7 +18,8 @@
margin: 0;
}
.flash-notice, .flash-alert {
.flash-notice,
.flash-alert {
border-radius: $border-radius-default;
.container-fluid,
......@@ -30,7 +31,8 @@
&.flash-container-page {
margin-bottom: 0;
.flash-notice, .flash-alert {
.flash-notice,
.flash-alert {
border-radius: 0;
}
}
......
......@@ -25,7 +25,9 @@
a {
color: $color-light;
&:hover, &:focus, &:active {
&:hover,
&:focus,
&:active {
background: $color-dark;
}
......
......@@ -15,7 +15,8 @@ header {
margin: 8px 0;
text-align: center;
.tanuki-logo, img {
.tanuki-logo,
img {
height: 36px;
}
}
......@@ -54,7 +55,9 @@ header {
line-height: 28px;
text-align: center;
&:hover, &:focus, &:active {
&:hover,
&:focus,
&:active {
background-color: $background-color;
}
......@@ -125,7 +128,8 @@ header {
left: -50%;
}
svg, img {
svg,
img {
height: 36px;
}
......@@ -222,7 +226,8 @@ header {
margin: 0;
float: none !important;
.visible-xs, .visable-sm {
.visible-xs,
.visable-sm {
display: table-cell !important;
}
}
......
......@@ -76,14 +76,16 @@
/** light list with border-bottom between li **/
ul.bordered-list, ul.unstyled-list {
ul.bordered-list,
ul.unstyled-list {
@include basic-list;
&.top-list {
li:first-child {
padding-top: 0;
h4, h5 {
h4,
h5 {
margin-top: 0;
}
}
......
......@@ -79,7 +79,8 @@
padding-left: 15px !important;
}
.nav-links, .nav-links {
.nav-links,
.nav-links {
li a {
font-size: 14px;
padding: 19px 10px;
......@@ -99,18 +100,21 @@
@media (max-width: $screen-sm-max) {
.issues-filters {
.milestone-filter, .labels-filter {
.milestone-filter,
.labels-filter {
display: none;
}
}
.page-title {
.note-created-ago, .new-issue-link {
.note-created-ago,
.new-issue-link {
display: none;
}
}
.issue_edited_ago, .note_edited_ago {
.issue_edited_ago,
.note_edited_ago {
display: none;
}
......
......@@ -54,7 +54,9 @@
color: #959494;
border-bottom: 2px solid transparent;
&:hover, &:active, &:focus {
&:hover,
&:active,
&:focus {
text-decoration: none;
outline: none;
}
......@@ -211,7 +213,11 @@
padding-bottom: 0;
width: 100%;
.btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
.btn,
form,
.dropdown,
.dropdown-menu-toggle,
.form-control {
margin: 0 0 10px;
display: block;
width: 100%;
......@@ -245,7 +251,8 @@
}
&.adjust {
.nav-text, .nav-controls {
.nav-text,
.nav-controls {
width: auto;
}
}
......@@ -309,13 +316,15 @@
padding-top: 10px;
}
a, i {
a,
i {
color: $layout-link-gray;
}
&.active {
a, i {
a,
i {
color: $black;
}
......@@ -328,7 +337,8 @@
}
&:hover {
a, i {
a,
i {
color: $black;
}
}
......
......@@ -3,7 +3,8 @@
width: 100% !important;
}
.select2-container, .select2-container.select2-drop-above {
.select2-container,
.select2-container.select2-drop-above {
.select2-choice {
background: #fff;
border-color: $input-border;
......@@ -71,7 +72,8 @@
}
.select2-container-active {
.select2-choice, .select2-choices {
.select2-choice,
.select2-choices {
box-shadow: none;
}
}
......
......@@ -23,7 +23,8 @@ table {
}
tr {
td, th {
td,
th {
padding: 10px $gl-padding;
line-height: 20px;
vertical-align: middle;
......
......@@ -126,7 +126,8 @@
box-shadow: none;
.panel-body {
form, pre {
form,
pre {
margin: 0;
}
......
......@@ -131,12 +131,14 @@
font-weight: inherit;
}
ul, ol {
ul,
ol {
padding: 0;
margin: 3px 0 3px 28px !important;
}
ul:dir(rtl), ol:dir(rtl) {
ul:dir(rtl),
ol:dir(rtl) {
margin: 3px 28px 3px 0 !important;
}
......@@ -144,7 +146,8 @@
line-height: 1.6em;
}
a[href*="/uploads/"], a[href*="storage.googleapis.com/google-code-attachments/"] {
a[href*="/uploads/"],
a[href*="storage.googleapis.com/google-code-attachments/"] {
&:before {
margin-right: 4px;
......@@ -167,7 +170,12 @@
}
/* Link to current header. */
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
a.anchor {
......@@ -215,7 +223,12 @@ body {
margin: 12px 7px;
}
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
color: $gl-title-color;
font-weight: 600;
}
......@@ -273,7 +286,10 @@ a > code {
text-decoration: line-through;
}
h1, h2, h3, h4 {
h1,
h2,
h3,
h4 {
small {
color: $gl-gray;
}
......
/* https://github.com/MozMorris/tomorrow-pygments */
.code.dark {
// Line numbers
.line-numbers, .diff-line-num {
.line-numbers,
.diff-line-num {
background-color: #1d1f21;
}
.diff-line-num, .diff-line-num a {
.diff-line-num,
.diff-line-num a {
color: rgba(255, 255, 255, 0.3);
}
// Code itself
pre.code, .diff-line-num {
pre.code,
.diff-line-num {
border-color: #666;
}
&, pre.code, .line_holder .line_content {
&,
pre.code,
.line_holder .line_content {
background-color: #1d1f21;
color: #c5c8c6;
}
......@@ -31,11 +36,13 @@
border-color: darken(#557, 15%);
}
.diff-line-num.new, .line_content.new {
.diff-line-num.new,
.line_content.new {
@include diff_background(rgba(51, 255, 51, 0.1), rgba(51, 255, 51, 0.2), #808080);
}
.diff-line-num.old, .line_content.old {
.diff-line-num.old,
.line_content.old {
@include diff_background(rgba(255, 51, 51, 0.2), rgba(255, 51, 51, 0.25), #808080);
}
......
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */
.code.monokai {
// Line numbers
.line-numbers, .diff-line-num {
.line-numbers,
.diff-line-num {
background-color: #272822;
}
.diff-line-num, .diff-line-num a {
.diff-line-num,
.diff-line-num a {
color: rgba(255, 255, 255, 0.3);
}
// Code itself
pre.code, .diff-line-num {
pre.code,
.diff-line-num {
border-color: #555;
}
&, pre.code, .line_holder .line_content {
&,
pre.code,
.line_holder .line_content {
background-color: #272822;
color: #f8f8f2;
}
......@@ -31,11 +36,13 @@
border-color: darken(#49483e, 15%);
}
.diff-line-num.new, .line_content.new {
.diff-line-num.new,
.line_content.new {
@include diff_background(rgba(166, 226, 46, 0.1), rgba(166, 226, 46, 0.15), #808080);
}
.diff-line-num.old, .line_content.old {
.diff-line-num.old,
.line_content.old {
@include diff_background(rgba(254, 147, 140, 0.15), rgba(254, 147, 140, 0.2), #808080);
}
......
/* https://gist.github.com/qguv/7936275 */
.code.solarized-dark {
// Line numbers
.line-numbers, .diff-line-num {
.line-numbers,
.diff-line-num {
background-color: #002b36;
}
.diff-line-num, .diff-line-num a {
.diff-line-num,
.diff-line-num a {
color: rgba(255, 255, 255, 0.3);
}
// Code itself
pre.code, .diff-line-num {
pre.code,
.diff-line-num {
border-color: #113b46;
}
&, pre.code, .line_holder .line_content {
&,
pre.code,
.line_holder .line_content {
background-color: #002b36;
color: #93a1a1;
}
......@@ -31,11 +36,13 @@
border-color: darken(#174652, 15%);
}
.diff-line-num.new, .line_content.new {
.diff-line-num.new,
.line_content.new {
@include diff_background(rgba(133, 153, 0, 0.15), rgba(133, 153, 0, 0.25), #113b46);
}
.diff-line-num.old, .line_content.old {
.diff-line-num.old,
.line_content.old {
@include diff_background(rgba(220, 50, 47, 0.3), rgba(220, 50, 47, 0.25), #113b46);
}
......
......@@ -7,20 +7,25 @@
.code.solarized-light {
// Line numbers
.line-numbers, .diff-line-num {
.line-numbers,
.diff-line-num {
background-color: #fdf6e3;
}
.diff-line-num, .diff-line-num a {
.diff-line-num,
.diff-line-num a {
color: $black-transparent;
}
// Code itself
pre.code, .diff-line-num {
pre.code,
.diff-line-num {
border-color: #c5d0d4;
}
&, pre.code, .line_holder .line_content {
&,
pre.code,
.line_holder .line_content {
background-color: #fdf6e3;
color: #586e75;
}
......@@ -37,11 +42,13 @@
border-color: darken(#ddd8c5, 15%);
}
.diff-line-num.new, .line_content.new {
.diff-line-num.new,
.line_content.new {
@include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.25), #c5d0d4);
}
.diff-line-num.old, .line_content.old {
.diff-line-num.old,
.line_content.old {
@include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.25), #c5d0d4);
}
......
......@@ -7,20 +7,25 @@
.code.white {
// Line numbers
.line-numbers, .diff-line-num {
.line-numbers,
.diff-line-num {
background-color: $background-color;
}
.diff-line-num, .diff-line-num a {
.diff-line-num,
.diff-line-num a {
color: $black-transparent;
}
// Code itself
pre.code, .diff-line-num {
pre.code,
.diff-line-num {
border-color: $table-border-gray;
}
&, pre.code, .line_holder .line_content {
&,
pre.code,
.line_holder .line_content {
background-color: #fff;
color: #333;
}
......
......@@ -56,7 +56,8 @@
padding: 10px;
text-align: center;
> div, p {
> div,
p {
display: inline;
margin: 0;
......
......@@ -12,7 +12,8 @@
border-color: $border-color;
}
th, td {
th,
td {
padding: 10px $gl-padding;
}
......
......@@ -2,14 +2,16 @@
display: block;
}
.commit-author, .commit-committer {
.commit-author,
.commit-committer {
display: block;
color: #999;
font-weight: normal;
font-style: italic;
}
.commit-author strong, .commit-committer strong {
.commit-author strong,
.commit-committer strong {
font-weight: bold;
font-style: normal;
}
......
......@@ -63,7 +63,8 @@
display: inline-block;
}
.btn-clipboard, .btn-transparent {
.btn-clipboard,
.btn-transparent {
padding-left: 0;
padding-right: 0;
}
......@@ -162,7 +163,8 @@
.branch-commit {
color: $gl-gray;
.commit-id, .commit-row-message {
.commit-id,
.commit-row-message {
color: $gl-gray;
}
}
......
......@@ -2,7 +2,12 @@
margin-bottom: 20px;
border-bottom: 1px solid #eee;
> h1, h2, h3, h4, h5, h6 {
> h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 400;
}
......@@ -10,7 +15,8 @@
margin-bottom: 20px;
}
ul, ol {
ul,
ol {
padding-left: 0;
}
......
......@@ -13,7 +13,8 @@
color: #5c5d5e;
}
.issue_created_ago, .author_link {
.issue_created_ago,
.author_link {
white-space: nowrap;
}
}
......
......@@ -124,7 +124,8 @@
}
}
.old_line, .new_line {
.old_line,
.new_line {
margin: 0;
padding: 0;
border: none;
......@@ -281,7 +282,8 @@
position: relative;
}
.frame.added, .frame.deleted {
.frame.added,
.frame.deleted {
position: absolute;
display: block;
top: 0;
......@@ -347,7 +349,8 @@
text-align: center;
background: #eee;
ul, li {
ul,
li {
list-style: none;
margin: 0;
padding: 0;
......
......@@ -91,7 +91,9 @@
}
}
.gitignore-selector, .license-selector, .gitlab-ci-yml-selector {
.gitignore-selector,
.license-selector,
.gitlab-ci-yml-selector {
.dropdown {
line-height: 21px;
}
......
......@@ -2,7 +2,9 @@
max-width: 400px;
margin: 0 auto;
h1, h2, h3 {
h1,
h2,
h3 {
text-align: center;
}
......
......@@ -43,7 +43,8 @@ ul.related-merge-requests > li {
}
}
.merge-requests-title, .related-branches-title {
.merge-requests-title,
.related-branches-title {
font-size: 16px;
font-weight: 600;
}
......
......@@ -41,7 +41,8 @@
font-size: 13px;
}
.login-box, .omniauth-container {
.login-box,
.omniauth-container {
box-shadow: 0 0 0 1px $border-color;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
......@@ -198,7 +199,8 @@
.form-control {
&:active, &:focus {
&:active,
&:focus {
background-color: #fff;
}
}
......@@ -261,7 +263,8 @@
position: relative;
}
.footer-container, hr.footer-fixed {
.footer-container,
hr.footer-fixed {
position: absolute;
bottom: 0;
left: 0;
......
......@@ -101,7 +101,8 @@ $colors: (
@mixin color-scheme($color) {
.header.line_content, .diff-line-num {
.header.line_content,
.diff-line-num {
&.origin {
background-color: map-get($colors, #{$color}_header_origin_neutral);
border-color: map-get($colors, #{$color}_header_origin_neutral);
......
......@@ -50,7 +50,8 @@
}
}
.issues-sortable-list, .merge_requests-sortable-list {
.issues-sortable-list,
.merge_requests-sortable-list {
.issuable-detail {
display: block;
margin-top: 7px;
......
......@@ -24,7 +24,8 @@
display: none;
}
.new-note, .note-edit-form {
.new-note,
.note-edit-form {
.note-form-actions {
margin-top: $gl-padding;
}
......
......@@ -28,7 +28,8 @@ ul.notes {
}
}
.note-created-ago, .note-updated-at {
.note-created-ago,
.note-updated-at {
white-space: nowrap;
}
......
......@@ -248,7 +248,8 @@
font-size: 14px;
}
svg, .fa {
svg,
.fa {
margin-right: 0;
}
}
......@@ -529,7 +530,8 @@
// Connect each build (except for first) with curved lines
&:not(:first-child) {
&::after, &::before {
&::after,
&::before {
content: '';
top: -49px;
position: absolute;
......@@ -555,7 +557,8 @@
// Connect second build to first build with smaller curved line
&:nth-child(2) {
&::after, &::before {
&::after,
&::before {
height: 29px;
top: -9px;
}
......@@ -570,7 +573,8 @@
.build {
// Remove right connecting horizontal line from first build in last stage
&:first-child {
&::after, &::before {
&::after,
&::before {
border: none;
}
}
......
......@@ -253,7 +253,8 @@
}
table.u2f-registrations {
th:not(:last-child), td:not(:last-child) {
th:not(:last-child),
td:not(:last-child) {
border-right: solid 1px transparent;
}
}
\ No newline at end of file
......@@ -6,7 +6,8 @@
}
}
.no-ssh-key-message, .project-limit-message {
.no-ssh-key-message,
.project-limit-message {
background-color: #f28d35;
margin-bottom: 0;
}
......@@ -385,7 +386,8 @@ a.deploy-project-label {
text-align: center;
width: 169px;
&:hover, &.forked {
&:hover,
&.forked {
background-color: $row-hover;
border-color: $row-hover-border;
}
......@@ -734,7 +736,8 @@ pre.light-well {
.table-bordered {
border-radius: 1px;
th:not(:last-child), td:not(:last-child) {
th:not(:last-child),
td:not(:last-child) {
border-right: solid 1px transparent;
}
}
......@@ -757,7 +760,8 @@ pre.light-well {
}
}
.project-refs-form .dropdown-menu, .dropdown-menu-projects {
.project-refs-form .dropdown-menu,
.dropdown-menu-projects {
width: 300px;
@media (min-width: $screen-sm-min) {
......
......@@ -65,7 +65,8 @@
.search-input-wrap {
width: 100%;
.search-icon, .clear-icon {
.search-icon,
.clear-icon {
position: absolute;
right: 5px;
top: 0;
......@@ -185,7 +186,8 @@
padding-right: $gl-padding + 15px;
}
.btn-search, .btn-new {
.btn-search,
.btn-new {
width: 100%;
margin-top: 5px;
......
......@@ -23,7 +23,8 @@
border-bottom: 1px solid $table-border-gray;
border-top: 1px solid $table-border-gray;
td, th {
td,
th {
line-height: 21px;
}
......@@ -74,7 +75,8 @@
max-width: 320px;
vertical-align: middle;
i, a {
i,
a {
color: $gl-dark-link-color;
}
......
.wiki h1, .wiki h2, .wiki h3, .wiki h4, .wiki h5, .wiki h6 {margin-top: 17px; }
.wiki h1 {font-size: 30px;}
.wiki h2 {font-size: 22px;}
.wiki h3 {font-size: 18px; font-weight: bold; }
.wiki h1,
.wiki h2,
.wiki h3,
.wiki h4,
.wiki h5,
.wiki h6 {
margin-top: 17px;
}
.wiki h1 {
font-size: 30px;
}
.wiki h2 {
font-size: 22px;
}
.wiki h3 {
font-size: 18px;
font-weight: bold;
}
header,
nav,
......
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