Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all extends use placeholders #1649

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ rules:
scss/at-mixin-parentheses-space-before: never
scss/no-duplicate-mixins: true

scss/at-extend-no-missing-placeholder: null

scss/dollar-variable-colon-space-after: always
scss/dollar-variable-colon-space-before: never
scss/dollar-variable-pattern: '^[a-z_0-9]+$' # snakecase
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/galleries.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
align-items: stretch;
input { height: 23px; }

.icons-box {
.icons-box, .replace-icon {
display: flex;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -126,7 +126,7 @@

/* The preview icon boxes on replace icon and replace character */
.replace-icon {
@extend .icons-box;
background-color: $bg_color_icon;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this on purpose? Doesn't seem related to the @extend at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have to hunt for the icons-box definition but I suspect I just copied that from it

width: 150px;
text-align: center;
}
Expand Down
6 changes: 4 additions & 2 deletions app/assets/stylesheets/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ button, .button {
}
}

.spacer {
%shared-spacer {
padding: 0px !important;
height: 2px;

Expand All @@ -84,8 +84,10 @@ button, .button {
}
}

.spacer { @extend %shared-spacer; }

.spacer-alt {
@extend .spacer;
@extend %shared-spacer;
background-color: $bg_color_spacer_alt;
}

Expand Down
10 changes: 6 additions & 4 deletions app/assets/stylesheets/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,28 @@ table { width: 100%; }
margin: 0;
}

.table-title, .content-header, .search-results-header {
%shared-table-title {
background-color: $bg_color_head;
color: $font_color_head;
padding: 15px;
font-size: $font_size_large;
font-weight: normal;
}

.table-title, .content-header, .search-results-header { @extend %shared-table-title; }

.info-box-header, .editor-title {
@extend .table-title;
@extend %shared-table-title;
text-align: center;
}

.search-params-header {
@extend .table-title;
@extend %shared-table-title;
width: 150px;
}

.gallery-table-title {
@extend .table-title;
@extend %shared-table-title;
&, &.subber { padding: 10px; }
}

Expand Down