Face44 / theme

1 stars 2 forks source link

Implementation Principles #1

Open SebastianStehle opened 3 years ago

SebastianStehle commented 3 years ago

I just want to point out the implementation principles again:

Follow the sass principles.

Override bootstrap component.

Examples where it has not been followed:

  1. Custom card like structures.
  2. Dropdown menu

Use bootstrap variables.

Use utilities classes only when it makes sense.

<span class="badge badge-secondary text-muted rounded mb-1 mr-1">image</span>

These component has a few issues:

  1. It overrides the badge border-radius with rounded instead of setting the bootstrap var. Why should this badge have another border-radius`?
  2. It overrides the text color with text-muted. Why should this badge have another color?

There are dozens of problems like this. The problem is that you can easily forget to add these classes which will lead into inconsistent design.

Use existing components instead of implementing new components.

For example new list examples have been introduced.

SebastianStehle commented 3 years ago

The principles are still not followed. Just a few examples:

image

image

See: https://getbootstrap.com/docs/5.0/components/dropdowns/#headers

image

jahanzaibmalik17 commented 3 years ago

Fixed these issues:

SebastianStehle commented 3 years ago

I would not focus too much on the text-white thing. The important aspect is that the components do not rely on utility classes to work properly.

of course you can use them to make adjustments when they are used in a composition, e.g. setting the margin for a button when used inside a pricing card.

jahanzaibmalik17 commented 3 years ago

Hi there Removed some of the unnecessary utility classes https://github.com/Face44/theme/commit/02dba63154f2d18c9b2cbeae5b5e188245504156