Closed HaSistrunk closed 3 years ago
rockarch.org removes the table of contents display on small screens, where you can then access it using a button. From the html, it looks like we were looking to move away from that, or at least remove it from the component here.
We still need a strategy for mobile though, right? I think part of the complexity is that the actual HTML structure for the table of contents is created by JavaScript by looking at the page headers.
I think the line spacing on the title when it wraps (such as on small mobile) may be a little tight:
.stories.js
file to wrap the color components in a div (which does keep them from overlapping from the sticky styles), but wasn't able to make it work. @helrond , did you ever try to use decorators with components? I can add a wrapping <div>
in the handlebars file, but was trying to avoid messing with the component html.I think my instinct is to keep this component simple. The reality is that the button/dropdown is a completely different component, and (I think) is implemented so that it's shown in place of the table of contents on a smaller screen.
I think my instinct is to keep this component simple. The reality is that the button/dropdown is a completely different component, and (I think) is implemented so that it's shown in place of the table of contents on a smaller screen.
Seems like a good path forward. We can iterate later if necessary. I think I still need to do a little cleanup here, though.
Ok, I've simplified this a bit, added the active
class, and tweaked things to better enable multiple titles to be used (like in the docs site). I also updated the Storybook documentation accordingly.
Fixes #68
Based on styles from rockarch.org.
rockarch.org removes the table of contents display on small screens, where you can then access it using a button. From the html, it looks like we were looking to move away from that, or at least remove it from the component here.
Storybook includes 3 color versions and one with a title, which we don't have existing styles for, so I made some design decisions on those. I welcome feedback if others have a different vision.
I also removed the selector-psuedo-class-focus rule from stylelint/a11y because it wasn't letting me adjust hover styles without also applying a focus style (even though there were existing focus styles that had already been defined in _base.scss).