How do I use BEM with responsive design grids and visibility classes #270
Unanswered
harrington101
asked this question in
Q&A
Replies: 1 comment
-
I think there is no difference. I mean BEM helps you to understand abstractions, what is a block, what a element, (OCSS). But BEM also use helpers like you has commented. In this example you use your BEM styles as usual and next you add SCSS // (UI) Styles for your site
.site-search {} // Block
.site-search__field {} // Element
.site-search--full {} // Modifier
// (UI) Helpers
.is-user-admin {} // Show button admin
.is-featured {} // Show highlighted style
// (LIBS) Helpers from other libs like Bootstrap
.is-hide {} // Hide
.small-12 {} // Using grid - colum small 12 steps HTML <div class="site-search site-search--full is-hide"></div> Here a visual example: http://codepen.io/unavezfui/pen/JKaVEP |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am used to using a framework such as Bootstrap or Foundation with my CSS. These frameworks give me classes such as .show-for-medium-up and .hide-for-large for controlling visibility of elements. It also has a grid like ..column .large-6 .small-12 for example to show something that takes up the whole screen on a small display but only half of the screen on a large display. How would I do this in BEM without re-doing the CSS for every block or element?
Beta Was this translation helpful? Give feedback.
All reactions