-
Notifications
You must be signed in to change notification settings - Fork 4.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
[UI Components] resolve missing styles from checkbox-control component (#11089) #16551
Merged
youknowriad
merged 4 commits into
WordPress:master
from
jffng:fix/checkbox-missing-styling
Aug 1, 2019
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fdbc8fd
[UI Components] resolve missing styles from checkbox-control (#11089)
jffng 39c750f
Use existing Dashicon component
jffng 4958ad0
Merge branch 'master' into fix/checkbox-missing-styling
jffng adba645
Strip the comments regarding windows high contrast mode from compiled…
jffng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,72 @@ | ||
.components-checkbox-control__input[type="checkbox"] { | ||
margin-top: 0; | ||
border: 1px solid #b4b9be; | ||
background: #fff; | ||
color: #555; | ||
clear: none; | ||
cursor: pointer; | ||
display: inline-block; | ||
line-height: 0; | ||
height: 16px; | ||
margin: 0 4px 0 0; | ||
outline: 0; | ||
padding: 0 !important; | ||
text-align: center; | ||
vertical-align: middle; | ||
width: 16px; | ||
min-width: 16px; | ||
-webkit-appearance: none; | ||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); | ||
transition: 0.05s border-color ease-in-out; | ||
|
||
&:focus { | ||
border-color: #5b9dd9; | ||
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); | ||
// Only visible in Windows High Contrast mode. | ||
outline: 2px solid transparent; | ||
} | ||
|
||
&:checked { | ||
background: #11a0d2; | ||
border-color: #11a0d2; | ||
} | ||
|
||
&:focus:checked { | ||
border: none; | ||
} | ||
|
||
&:checked::before { | ||
content: none; | ||
} | ||
} | ||
|
||
.components-checkbox-control__label { | ||
position: relative; | ||
vertical-align: middle; | ||
line-height: 1; | ||
} | ||
|
||
svg.dashicon.components-checkbox-control__checked { | ||
width: 21px; | ||
height: 21px; | ||
fill: #fff; | ||
cursor: pointer; | ||
position: absolute; | ||
left: -31px; | ||
bottom: -3px; | ||
user-select: none; | ||
pointer-events: none; | ||
} | ||
|
||
@media screen and ( max-width: 728px ) { | ||
.components-checkbox-control__input[type="checkbox"] { | ||
width: 25px; | ||
height: 25px; | ||
} | ||
|
||
svg.dashicon.components-checkbox-control__checked { | ||
width: 31px; | ||
height: 31px; | ||
left: -41px; | ||
bottom: -9px; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For anyone else reviewing this, this whole green section is largely copied from http://localhost:8888/wp-admin/css/forms.css?ver=5.2.2, so it is as it says on the bin, a copy of the CSS from wp-admin. So while it would be nice to refactor away the
!important
, this is a separate task bringing these components to all of wp-admin.