thesephist/blocks.css

blocks.css "clashes" with tailwindcss

vinliao opened this issue · 1 comments

If you combine this with tailwindcss, the blocks looks weird.

There's a .block class in tailwind's css. I thought this is the culprit, but removing this class didn't do anything. I also tried importing blocks.css before and after tailwind, but both leads to the same outcome.

Screenshot from 2021-02-08 14-38-38

Screenshot from 2021-02-08 14-35-11

Found the culprit: if box-sizing: border-box; is removed from tailwind, blocks.css works fine.

Screenshot from 2021-02-08 16-27-02

The good ol' box model problem.

Edit: another way to replicate.

  1. Pull blocks.css locally, add this line at the very top.
*::after,
*::before {
  box-sizing: border-box;
}
  1. Load blocks.css on html
  2. Try out the .block class; it breaks.