[Question] Support for Carbon Grid layout
See original GitHub issueQuestion about how to support the Carbon Grid layout using Angular componentry?
Detailed description
We are starting to use the Carbon Grid layout in our code and have been experimenting with create Angular components to abstract away the details.
Currently you would add markup like this to your template:
<div class="bx--grid">
<div class="bx--row">
<div class="bx--offset-xs-2 bx--col-xs-10 bx--col-md-5">Some content here</div>
</div>
</div>
This is rather verbose and difficult to write so we have created some components that reduces this to the following:
<ibm-grid>
<ibm-row>
<ibm-column offset="{xs:2}" col="{xs:10, md:5}">Some content here</ibm-column>
</ibm-row>
</ibm-grid>
For the case where no breakpoint needs to be specified could look like this:
<ibm-grid>
<ibm-row>
<ibm-column offset="2" col="2">Some content here</ibm-column>
</ibm-row>
</ibm-grid>
This would only work if we don’t need to support break points and no break points at the same time. Not sure if this will always be the case.
So we wanted to get your feedback on this approach and your guidance on the best way to proceed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[Question] Support for Carbon Grid layout #47 - GitHub
Question about how to support the Carbon Grid layout using Angular componentry? Detailed description We are starting to use the Carbon Grid ...
Read more >2x Grid - Carbon Design System
The IBM 2x Grid system is a fully responsive, robust, 16 column layout system with five default breakpoints and dozens of predefined classes....
Read more >Does Conjointly support grid type questions?
While grid-type questions are commonly used in web surveys, Conjointly does not currently support them without the use of a customisation.
Read more >eGRID Questions and Answers | US EPA
eGRID data can be used to support the following activities: ... Carbon Sequestration Database and Geographic Information System (NATCARB), ...
Read more >IBM Design Language
The IBM Design Language provides the guidance and assets used to express the IBM brand in products, ... grid of ibm colors ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zvonimirfras thanks for the suggestions, we will try out that approach. If it works out we can open a PR to see if it’s something worth adding to the library.
That is accurate, Stan, we used it in multiple places. Thing is, with components, you need something in the template, so that something bloats the DOM if you don’t need it. Directives don’t have that limitation. You can also apply directives to other tags so technically you could apply layouts to other components. You can’t do that if layouts are done with components.