-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix _wp-components-overrides.scss
by increasing selector specifity
#79708
Changes from all commits
77ded48
0fd06fd
d183d2a
ffb92f9
05ae6dd
a7177e3
6789223
ff5d1f2
f157e20
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 |
---|---|---|
|
@@ -33,11 +33,6 @@ | |
box-shadow: unset; | ||
} | ||
|
||
.components-button:active:not(:disabled) { | ||
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); | ||
outline: 3px solid transparent; | ||
} | ||
|
||
&.domains { | ||
padding: 0; | ||
width: 754px; | ||
|
@@ -418,4 +413,10 @@ | |
width: 150px; | ||
@include placeholder(); | ||
} | ||
|
||
button.components-button.bulk-domain-transfer__cta { | ||
&:disabled { | ||
background: var(--studio-gray-5); | ||
} | ||
} | ||
Comment on lines
+417
to
+421
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 we move this over to the wp-components-overrides file and generalize for all buttons? or if that's not an option right now at least into the stepper global.scss? |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,26 +23,11 @@ $heading-font-family: "SF Pro Display", $sans; | |
margin-bottom: 32px; | ||
|
||
.bulk-domain-transfer__cta { | ||
justify-content: center; | ||
color: var(--black-white-white, #fff); | ||
height: 48px; | ||
/* stylelint-disable-next-line declaration-property-unit-allowed-list */ | ||
border-radius: 0.25rem; | ||
background: var(--blue-blue-50, #0675c4); | ||
font-size: 0.875rem; | ||
width: 240px; | ||
font-weight: 500; | ||
|
||
&:hover { | ||
background: var(--studio-blue-60); | ||
} | ||
|
||
&:disabled { | ||
/* stylelint-disable-next-line declaration-property-unit-allowed-list */ | ||
border-radius: 0.25rem; | ||
background: var(--gray-gray-5, #dcdcde); | ||
opacity: 1; | ||
} | ||
justify-content: center; | ||
border-radius: 4px; | ||
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 the border-radius change be done at the component level? Using button components in calypso shouldn't involve usage level CSS. Maybe we need a new |
||
|
||
@media (max-width: $break-medium ) { | ||
width: 100%; | ||
|
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.
Feels like we're missing a root cause here, why is adding this a fix?
As long as we're importing our overrides (this file) after the wordpress styles get imported (
@wordpress/components/build-style/style
), then we shouldn't need this change right?I think what's happening is
client/assets/stylesheets/style.css
is being loaded into the stepper framework, where maybe previously it wasn't?The client style.css file pulls in these lines:
wp-calypso/client/assets/stylesheets/style.scss
Lines 18 to 21 in a610546
Then later in the stepper framework pull in
wordpress/component
styles again here:wp-calypso/client/landing/stepper/declarative-flow/internals/global.scss
Line 4 in a610546
This overrides our overrides back with original styling.
I think the fix is to remove that line and then add our new overrides as required for
wordpress/components
in either the calypso-wide override fileclient/assets/stylesheets/_wp-components-overrides.scss
or the stepper framework'sclient/landing/stepper/declarative-flow/internals/global.scss
depending on which is more appropriate for the override.I confirmed that if you remove that import line in global.scss and then add in the color overrides again:
That the links have the right color in the link-in-bio flow.
We likely still need a new disabled button style added into the calypso-wide overrides file for a complete fix. Commented below.
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.
Great investigation @lsl, I created a first version of this idea here.
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.
Thanks Louis! Much appreciated.