TEHIK-EE / tedi-design-system

TEDI is TEHIK design system
3 stars 11 forks source link

Grid #165

Closed airikej closed 1 day ago

airikej commented 2 months ago

Later:

tarmokullas commented 1 month ago

Would it be possible to make <Col><Row>...</Row></Col> also work and be legible? Currently, there is a rule that Col has to be a direct child of Row.

I find <Row direction="column"><Col>...</Col></Row> to be a bit controversial since they switch meaning and make code reading worse.

airikej commented 1 month ago

The grid system is built on Bootstrap 5's structure, where a common design rule is that columns (<Col>) are always wrapped by rows (<Row>). Changing this hierarchy would introduce significant risks, such as:

I understand that using <Row direction="column"> may not seem ideal for readability, but this is due to Bootstrap’s internal structure. Additionally, this pattern isn't widely used, so sticking to the standard approach is generally safer

tarmokullas commented 1 month ago

Okay, that makes sense. I've had to use Bootstrap very seldom, so I didn't know it was already set up there. Let's keep it as is, then. Thanks for the explanation!