-
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
Add named colors, polish HTML editor #354
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,6 +1,37 @@ | ||
$gray: #575D65; | ||
$light-gray: #e0e5e9; | ||
/* Hugo's new WordPress shades of gray, from http://codepen.io/hugobaeta/pen/grJjVp */ | ||
$black: #000; | ||
$dark-gray-900: #191e23; | ||
$dark-gray-800: #23282d; | ||
$dark-gray-700: #32373c; | ||
$dark-gray-600: #40464d; | ||
$dark-gray-500: #555d66; // use this most of the time for dark items | ||
$dark-gray-400: #606a73; | ||
$dark-gray-300: #6c7781; | ||
$dark-gray-200: #7e8993; | ||
$dark-gray-100: #8f98a1; | ||
$light-gray-900: #a2aab2; | ||
$light-gray-800: #b5bcc2; | ||
$light-gray-700: #ccd0d4; | ||
$light-gray-600: #d7dade; | ||
$light-gray-500: #e2e4e7; // good for "grayed" items and borders | ||
$light-gray-400: #e8eaeb; | ||
$light-gray-300: #edeff0; | ||
$light-gray-200: #f3f4f5; | ||
$light-gray-100: #f8f9f9; | ||
$white: #fff; | ||
|
||
/* Extra colors, some from https://make.wordpress.org/design/handbook/foundations/colors/ */ | ||
$blue-wordpress-700: #00669b; | ||
$blue-wordpress: #0073aa; | ||
|
||
$blue-medium: #00a0d2; | ||
$blue-medium-400: #33B3DB; | ||
$blue-medium-300: #66C6E4; | ||
$blue-medium-200: #BFE7F3; | ||
$blue-medium-100: #E5F5FA; | ||
|
||
/* Other */ | ||
$editor-font: "Noto Serif", serif; | ||
$editor-html-font: "Meno", monospace; | ||
$editor-font-size: 16px; | ||
$editor-line-height: 1.8em; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
/** | ||
* Editor Styles | ||
*/ | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
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 is already added here https://github.com/WordPress/gutenberg/blob/add/polish/editor/assets/stylesheets/main.scss#L19 and it's relative to the editor only to avoid altering any other WordPress style (sidebar etc...) 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. Ah, good catch, still finding my way here. |
||
|
||
|
||
/** | ||
* General Layout | ||
*/ | ||
|
||
.editor__header { | ||
height: 56px; | ||
padding: 10px; | ||
border-bottom: 1px solid $light-gray; | ||
border-bottom: 1px solid $light-gray-500; | ||
} | ||
|
||
.editor-mode-switcher { | ||
position: relative; | ||
} | ||
|
||
.editor-mode-switcher__toggle { | ||
color: $gray; | ||
color: $dark-gray-500; | ||
padding: 8px; | ||
align-items: center; | ||
cursor: pointer; | ||
border: none; | ||
background: none; | ||
border-right: 1px solid $light-gray; | ||
border-right: 1px solid $light-gray-500; | ||
vertical-align: middle; | ||
line-height: 20px; | ||
outline: none; | ||
|
@@ -23,8 +37,8 @@ | |
.editor-mode-switcher__content { | ||
position: absolute; | ||
top: 40px; | ||
border: 1px solid $light-gray; | ||
color: $gray; | ||
border: 1px solid $light-gray-500; | ||
color: $dark-gray-500; | ||
min-width: 100px; | ||
|
||
button { | ||
|
@@ -39,7 +53,7 @@ | |
} | ||
|
||
.editor-mode-switcher__arrow { | ||
border: 10px dashed $light-gray; | ||
border: 10px dashed $light-gray-500; | ||
height: 0; | ||
line-height: 0; | ||
position: absolute; | ||
|
@@ -79,6 +93,7 @@ | |
resize: none; | ||
padding: 0; | ||
overflow: hidden; | ||
font-family: $editor-html-font; | ||
} | ||
} | ||
|
||
|
@@ -97,3 +112,8 @@ | |
} | ||
} | ||
} | ||
|
||
/* Hide footer */ | ||
#wpfooter { | ||
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. Should we move this to the global stylesheet Should we add it under the 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. Perfect. |
||
display: none; | ||
} |
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.
Is this font loaded by default in WordPress? or should we load it in
index.php
like the "Noto" font?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.
I expect this font stack to grow further — Menlo is an OSX bundled system font. I will return with a better font stack later, but I don't think we should load any fonts separately.
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.
Is it "Menlo" or "Meno"?
So, you're saying we keep those as is temporary and we'll include them in the Repo later? I'm not sure I understand your point :P.
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.
Facepalm. It was Menlo. My apologies.
Are you referring to a webfont or just a font stack that picks from fonts available on your system?
I expanded the monospaced font stack so it's not temporary. Or rather, it's temporary insofar as I expect that we will probably revisit this in the future as I feel like there's a history here. But no webfonts are being loaded — we are just using fonts that you are likely to have on your system.