marcysutton / a11y-camp

Accessibility Camp Seattle site
https://seattle-a11y-camp.now.sh/
MIT License
1 stars 0 forks source link

Remove StyledComponents to simplify development, improve a11y #7

Open marcysutton opened 5 years ago

marcysutton commented 5 years ago

Now that I'm working more on this site and building out the missing content pages, I'm finding some things that should be simplified to make the site easier to develop and help with accessibility. In particular, the use of StyledComponents adds some extra layers of complexity:

Different approaches would be to use CSS modules, plain CSS imports per page or component, or a global CSS file. I'd be open to trying CSS modules since they are recommended by Gatsby, but we'll have to test to see whether the cached class names thing still causes problems (e.g. are they modified with every build or do they stay stable)? https://www.gatsbyjs.org/docs/css-modules/

marcysutton commented 5 years ago

Here's some info from Dustin on the Gatsby core team with regard to cached class names!

The first portion with CSS Modules remains constant (based on file system path) but the hash probably changes based on content changes.

If the goal is to provide something overwritable maybe just provide a second class name?

div className={`{styles.whatever} something-easily-themed`}