Skip to content

Commit

Permalink
Target mode switcher child styles by classname
Browse files Browse the repository at this point in the history
Nesting input to defeat specificity of general `.wp-admin select`
selector
  • Loading branch information
aduth committed Apr 10, 2017
1 parent c3dc925 commit fe4cf93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions editor/header/mode-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function ModeSwitcher( { mode, onSwitch } ) {
<select
value={ mode }
onChange={ ( event ) => onSwitch( event.target.value ) }
className="editor-mode-switcher__input"
>
{ MODES.map( ( { value, label } ) =>
<option key={ value } value={ value }>
Expand Down
12 changes: 6 additions & 6 deletions editor/header/mode-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
display: flex;
align-items: center;

select {
.editor-mode-switcher__input {
background: transparent;
line-height: 1;
border: 0;
border-radius: 0;
-webkit-appearance: none;
line-height: 1;
border: 0;
border-radius: 0;
-webkit-appearance: none;
outline: none;
cursor: pointer;
box-shadow: none;
padding-right: 24px;
}

svg {
.dashicon {
position: relative;
z-index: -1;
margin-left: -24px;
Expand Down

0 comments on commit fe4cf93

Please sign in to comment.