-
Notifications
You must be signed in to change notification settings - Fork 843
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
Sass guidelines #1257
Sass guidelines #1257
Conversation
8a9e56a
to
a8ffb2a
Compare
<EuiDescriptionList> | ||
<EuiDescriptionListTitle> | ||
<EuiDescriptionList compressed> | ||
<EuiDescriptionListTitle className="guidelineColor__title"> |
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.
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.
The main thing that bugs me about the presentation of this section is that you have to hover to see the namings of the combinations. I'd really like to see the "Text" actually say the color name and then put a header before each section with the background color name and just leave the tooltip to show the contrast level.
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.
Prolly outside the scope of this PR, but if you want to give it a shot, go for it.
@@ -51,3 +51,9 @@ $fractions: ( | |||
} | |||
} | |||
} | |||
@include euiBreakpoint('xs','s') { |
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.
Noticed a bug where the negative margins from EuiFlexGrid was messing up mobile.
@@ -43,7 +43,7 @@ $euiColorVis9: #920000 !default; | |||
|
|||
// Code | |||
|
|||
$euiCodeBlockBackgroundColor: $euiColorLightestShade !default; | |||
$euiCodeBlockBackgroundColor: rgba(0,0,0,.05) !default; |
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.
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 that enough and does it work in dark mode?
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.
Or in a tooltip?
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.
No, but i'll fix. I think I'll just remove this from the PR so it can be tackled 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.
So I had a solution for this with opacities, but it was a little hacky. I'm instead reverting the color change so I can merge this (but keeping some of the more general bugs we had with inline code in EuiText). I'll discuss my hacky solution with you another time. :)
@@ -0,0 +1,712 @@ | |||
import React from 'react'; | |||
import lightColors from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../src/global_styling/variables/_colors.scss'; |
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.
@chandlerprall Is there any way I can get the theme context in the lower level pages. To make this stuff work in dark mode I'd need to know what theme this page is viewing.
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.
This issue is the same problem as #605 so I'm going to leave it for now. We can address it in a later PR.
@daveyholler and @ryankeairns ^^ do you mind taking a look at this from a content perspective? This kind of doc is aimed at people who are writing Sass but not super familiar with what all the variables and mixins are. Hopefully this should make clear the following.
If there's anything you have questions on, ask them, and I'll make sure to include it. |
@snide Here are my suggestions:
|
|
The example callouts appear to use
|
Where it shows the two different values for |
It might be helpful to denote which of these is the default text color... is it
Same for the text sizes, which of these is the default/base K7 font size? is it |
Misspell on the variable name here (missing the 'k'): |
Should this be Target tablets and up not just tablet only? The word only made me think it targeted a fixed range between two pixel widths (which I don't think is the case):
|
Perhaps toss the border variables into this bullet list? It's the only section of this page not reflected in the bullet points :)
|
This is really helpful, thanks for putting it together. This will save me from searching through code in VSCode for the actual values! |
It is the case! |
More range options: `ticks`, `valueAppend`
5c66680
to
cd23b76
Compare
OK. Feedback addressed. Gonna wait to merge till morning. Think there might be something goofy going on with the yarn.lock file and wanna consult with @chandlerprall |
@chandlerprall did a check on this. merging down now that feedback is addressed. |
Summary
Adds guidelines for our Sass layer with some examples of what the output is.
Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark modeHas a similar issue to color guidelines where the colors don't appear correctly with theme.- [ ] Any props added have proper autodocs- [ ] This was checked for breaking changes and labeled appropriately- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This was checked against keyboard-only and screenreader scenarios