Skip to content
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

Update RuleDetails for compact mode #728

Merged
merged 2 commits into from
Aug 12, 2020

Conversation

LI0131
Copy link
Contributor

@LI0131 LI0131 commented Aug 11, 2020

Fixes some of the styling for compact mode

Before:

Screen Shot 2020-08-11 at 12 55 08 PM

Screen Shot 2020-08-11 at 12 55 29 PM

After:

Screen Shot 2020-08-11 at 12 54 03 PM

Screen Shot 2020-08-11 at 12 54 29 PM

@LI0131 LI0131 added bug Something isn't working 🌮 labels Aug 11, 2020
@LI0131 LI0131 requested review from mhuth and AllenBW August 11, 2020 17:19
@LI0131 LI0131 self-assigned this Aug 11, 2020
@@ -63,3 +71,15 @@ hr {
margin-bottom: var(--pf-global--spacer--md);
}
}

@media only screen and (max-width: 768px) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this exist as a pf var? feels like we shouldn't be hardcoding this value 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep
--pf-global--breakpoint--md | global_breakpoint_md | 768px

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So did a little digging on this... and it looks like it isn't possible use var() in a media query. https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries (unless we want to use a preprocessor?)

Copy link
Contributor

@AllenBW AllenBW Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooooo what about @media only screen and (min-width: $ins-break--md)

where $ins-break--md: var(--pf-global--breakpoint--md)

Copy link
Contributor

@AllenBW AllenBW Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually you dont neet to do that $ins-break--md: var(--pf-global--breakpoint--md); is already defined in
@import '~@redhat-cloud-services/frontend-components-utilities/files/Utilities/_all';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooo I had the same thought 😂

I think that approach falls victim to the same issue though. The styles don't seem to apply 🤷‍♂️🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local definition as well? 🤔 I see the value hardcoded (not the pf var) in a few places.. would hate for us to also do it 😢 will take a look tomorrow 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great minds 🧠 😆

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well... s on the radar w3c/csswg-drafts#2627 but yeah not currently possible in the way would hope

@@ -17,3 +19,9 @@
.categoryLabel {
margin-left: var(--pf-global--spacer--md)
}

@media only screen and (max-width: 768px) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following comment above, set this this to var(--pf-global--breakpoint--md)

Copy link
Contributor

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything look different in normal viewwwwwwwwwww? if not, after those two changes :merge_maid:

@AllenBW AllenBW merged commit a22d0bb into RedHatInsights:master Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🌮
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants