-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
CSS: Add a debugger class. #40976
base: main
Are you sure you want to change the base?
CSS: Add a debugger class. #40976
Changes from all commits
833be9f
186bda9
394b161
f58c9c5
76449ba
f7b15cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@if $enable-debugger-classes { | ||
.#{$prefix}grid-debug { | ||
&::before { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: 2000; | ||
padding: $spacer * .5 $spacer; | ||
font-family: $font-family-base; | ||
color: $black; | ||
background-color: $white; | ||
border-radius: 0 0 4px; // stylelint-disable-line property-disallowed-list | ||
@include font-size($h1-font-size); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this get font size from css a variable? then we may able to adjust it like |
||
} | ||
|
||
@each $breakpoint, $value in $grid-breakpoints { | ||
@include media-breakpoint-up($breakpoint) { | ||
&::before { | ||
content: "#{$breakpoint}"; | ||
} | ||
} | ||
} | ||
|
||
[class^="container"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you provide this functionality as a seperated class name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not, I don't have strong opinion on this. I did it this way because on my project, we use sometimes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feature looks nice but the developer may want to toggle on/off this option to make the design look more clear and understandable. You know, design considerations call for pixel-perfect work, and the overlay of this option can become annoying at some point.
It would be better if it does not have any connection with the other class name. The developer can use whatever he/she wants like |
||
&[class^="container"], | ||
.row, | ||
&.row { | ||
position: relative; | ||
|
||
&::before { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 1999; | ||
pointer-events: none; | ||
content: ""; | ||
background: repeating-linear-gradient(to right, transparent, transparent calc(var(--#{$prefix}gutter-x) * .5), var(--#{$prefix}primary) calc(var(--#{$prefix}gutter-x) * .5), var(--#{$prefix}primary) calc((100% - 12 * var(--#{$prefix}gutter-x)) / 12 + var(--#{$prefix}gutter-x) * .5), transparent calc((100% - 12 * var(--#{$prefix}gutter-x)) / 12 + var(--#{$prefix}gutter-x) * .5), transparent calc(100% / 12)); // stylelint-disable-line function-disallowed-list | ||
opacity: .3; | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -383,6 +383,7 @@ $enable-validation-icons: true !default; | |
$enable-negative-margins: false !default; | ||
$enable-deprecation-messages: true !default; | ||
$enable-important-utilities: true !default; | ||
$enable-debugger-classes: true !default; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default value looks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, it's done on purpose at the moment to be able to test it on the deploy preview but I think it will go to |
||
|
||
$enable-dark-mode: true !default; | ||
$color-mode-type: data !default; // `data` or `media-query` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$enable-debugger-classes: true !default; | ||
|
||
@import "functions"; | ||
@import "variables"; | ||
@import "mixins"; | ||
|
||
@import "debug"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,5 +58,6 @@ $utilities: map-get-multiple( | |
"padding-start", | ||
) | ||
); | ||
@import "debug"; | ||
|
||
@import "utilities/api"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
|
||
// Helpers | ||
@import "helpers"; | ||
@import "debug"; | ||
|
||
// Utilities | ||
@import "utilities/api"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this use em unit instead of rem unit for padding? Then it may adjust itself by its font size.