-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚚 Move Keyboard Shortcuts #904
Conversation
Unchaged from github/.../components/keyboard-shortcuts.scss
This pull request is automatically deployed with Now. Latest deployment for this branch: https://primer-css-git-kbd.primer.now.sh |
Can the overrides for
Maybe we should keep it for people that only use the Markdown bundle with @import "@primer/css/markdown/index.scss"; We could sync up the colors, but not sure if there is some history behind them? |
I would vote yes. The markdown-specific styles don't add much, IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I'm honestly not sure what the "right" thing is to do about the Markdown-specific styles, though. Our options appear to be:
- Delete the
.markdown-body kbd
styles altogether. This assumes that anyone using themarkdown
bundle is also usingcore
, but I guess if this were to break for somebody we could just tell them to add an import? - Add an
@import "../labels/keyboard-shortcuts.scss";
inside the.markdown-body {}
block so that the styles are duplicated, but still available in the standalonemarkdown
bundle.
Am I missing something?
I also think it might make sense to call this file |
Would make sense since we style the element directly. Was also thinking if it should be part of base.scss? But then it can't be found when clicking on "View source" in the docs. ok, yeah.. let's change it to
Hmmm.. with option 1, looks like we would have to import it for mobile and embedded gists? But that's only for |
Hmm.. now I'm not sure anymore... 😆 It feels a bit weird having the Option 3:Treat Then in the future we can consider turning |
I like how you handled this, @simurai. I think we can remove most (all?) of the styles from |
Hmm.. I think we have to keep the |
Okay I'm sorry @simurai, but now that they're exactly the same I think we should move the styles into |
ok, yeah.. it felt wrong importing from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huzzah, this is great! I suppose it doesn't really need docs of its own for now, right?
It looks like in its current state this also closes #919, right? |
Maybe not, unless we wanna document all the base styles.
Hmmm.. well, now that it's part of a major release, we could remove it from the markdown bundle. 🤔 But it's also nice being able to only import the markdown bundle and having support for |
This moves the keyboard shortcuts component from github/github to Primer CSS.
TODO
Add documentationSee 🚚 Move Keyboard Shortcuts #904 (comment)TODO on .com
.badmono
https://github.com/github/github/pull/124900.kb-shortcut-dialog
https://github.com/github/github/pull/124900Tracking https://github.com/github/design-systems/issues/684