-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Change mode switcher to a select box #389
Changes from 2 commits
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 |
---|---|---|
@@ -1,64 +1,36 @@ | ||
.editor-mode-switcher { | ||
position: relative; | ||
margin-right: $item-spacing; | ||
} | ||
|
||
.editor-mode-switcher__toggle { | ||
padding-right: $item-spacing; | ||
color: $dark-gray-500; | ||
padding: $item-spacing; | ||
align-items: center; | ||
cursor: pointer; | ||
border: none; | ||
background: none; | ||
border-right: 1px solid $light-gray-500; | ||
outline: none; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.editor-mode-switcher__content { | ||
position: absolute; | ||
top: 40px; | ||
border: 1px solid $light-gray-500; | ||
color: $dark-gray-500; | ||
min-width: 100px; | ||
|
||
button { | ||
padding: 8px; | ||
display: block; | ||
border: none; | ||
background: white; | ||
select { | ||
background: transparent; | ||
line-height: 1; | ||
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. No linting to capture it, but we ought to be cautious of mixed spacing in SCSS files. 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. Just wanted to let you know that I really appreciate this and very much taking notes. Thanks for pushing fixes too. |
||
border: 0; | ||
border-radius: 0; | ||
-webkit-appearance: none; | ||
outline: none; | ||
cursor: pointer; | ||
width: 100%; | ||
box-shadow: none; | ||
padding-right: 24px; | ||
} | ||
} | ||
|
||
.editor-mode-switcher__arrow { | ||
border: 10px dashed $light-gray-500; | ||
height: 0; | ||
line-height: 0; | ||
position: absolute; | ||
width: 0; | ||
z-index: 1; | ||
top: -10px; | ||
left: 50%; | ||
margin-left: -10px; | ||
border-bottom-style: solid; | ||
border-top: none; | ||
border-left-color: transparent; | ||
border-right-color: transparent; | ||
svg { | ||
position: relative; | ||
z-index: -1; | ||
margin-left: -24px; | ||
margin-top: -1px; | ||
} | ||
|
||
&:before { | ||
top: 2px; | ||
border: 10px solid white; | ||
content: " "; | ||
position: absolute; | ||
left: 50%; | ||
margin-left: -10px; | ||
border-bottom-style: solid; | ||
border-top: none; | ||
border-left-color: transparent; | ||
border-right-color: transparent; | ||
&:hover, | ||
select:hover { | ||
color: $dark-gray-900; | ||
} | ||
} |
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.
We don't want to duplicate the source of truth from state. We'll simply want the
render
logic to use the prop directly. I'll plan to refactor this afternoon.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.