-
Notifications
You must be signed in to change notification settings - Fork 827
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
[FEATURE] Improved Visibility styles for responsive designs #427
Comments
+1 |
Related to: #263 |
@kaelig an other approach is so you can keep the current code working as it is is to just do responsive hides e.g. |
The current implementation cannot be used for responsive designs because it only hides what is smaller than the break point. For instance the code below wont work as expected: <header>
<nav class="slds-medium-hide">navbar for mobile</nav>
<nav class="slds-medium-show">navbar for desktop</nav>
</header> The code above will load both navbars on desktop, ands seems like there is no way to do this correctly on SLDS. |
@kaelig also |
Thank you for the PR and contribution @3den ! This work has been updated on our internal repo and will be made publicly available upon our next release. |
Currently the visibility classes all add
display: block
, which breaks the grid, it is documented that we should create modifiers like.slds-medium-show--inline-block
which is a hack to please the incorrect implementation. Also based on BEM the modifier should be the size, like we did for containers, padding, margins...We can use a loop to generate this classes so we don't need to duplicate code.
PS: I am willing to send a PR for this issue.
The text was updated successfully, but these errors were encountered: