komponent
komponent copied to clipboard
Styleguide generator improvements
- [x] don't do nested css on komponent styleguide components, since
postcss-nested
(orpostcss-nesting
) is not installed by default with webpacker - [x] Add a
style.css
stylesheet file atfrontend/components/komponent/
to have generic css like (body { margin: 0; }
- [x] Add link to
Styleguide
in header - [ ] Use
rouge
or an other, to colorizecdoc
printed code
Others ideas
- [ ] List properties as table with
required
anddefault
value at beginning or end of a component page
I was thinking a bit more about the styleguide those days and I'm not sure if having styleguide always in application side is a good idea.
Having it customizable is a good idea, but not sure it is by default. I think that I could be a pain to keep styleguide up-to-date in future.
I've an alternative proposal.
- Stop using components for headers, sidebar, footer, header. All this html could be in layout.
- Having all styleguide component html, css in gem
- Having generator only update routes and create the pack file that load js and css present in gem (not sure if that is easy)
To let user do customization, we could do the following
- Having an option in generator to create views files (like
devise
do) - Use css variables for colors and fonts
- Make views should be loaded from app first, then gem. To be sure we can overwrite views from app.