Skip to content

code-group component appearance optimization #2632

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

Closed
wants to merge 1 commit into from

Conversation

liyuj
Copy link

@liyuj liyuj commented Sep 29, 2020

Summary
When the code-group component is selected, there is a white border line, which is hard to see
The height of the tab is too high

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • [*] Other, please describe:
    css is changed.
    If changing the UI of default theme, please provide the before/after screenshot:
    before:
    image

after:
image

Does this PR introduce a breaking change? (check one)

  • Yes
  • [ *] No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • [ *] Chrome
  • [ *] Firefox
  • [ *] Safari
  • [ *] Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@d-pollard d-pollard self-requested a review October 1, 2020 16:26
Copy link
Collaborator

@d-pollard d-pollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

After going over the code and reading a few a11y articles, I believe this would impact accessibility negatively:

Do We Really Need the Outlines?
Yes, you can remove them, but you should understand one thing first:
You should never remove the outline for users using a keyboard to surf the page. People that only use the keyboard need to understand where they are focused; with the mouse or touch you won’t have this problem.

-Source article

Instead of this change, the article goes onto mention a few a11y-safe options, and this project would strongly consider those if you'd like to make a PR for it.

Alternatively, for your own project, you should be able to override the default styling in docs/.vuepress/styles/index.styl and add these styles there to achieve the same net effect

Let me know if you have any questions about anything I've mentioned here

We appreciate your work on this and hope to see additional PRs in the future!

@bencodezen
Copy link
Member

Thank you for the thoughtful review @d-pollard and your time @liyuj!

@bencodezen bencodezen closed this Oct 1, 2020
@liyuj liyuj deleted the code-group branch October 2, 2020 00:48
@liyuj
Copy link
Author

liyuj commented Oct 2, 2020

Thank you for your explanation.
In addition, there is another change to this PR, namely:

padding-top: 3px;

The height of the tab bar looks too high. Can make it smaller?

This style doesn't seem to work palette.styl overwrite.
@bencodezen @d-pollard @duncan

@d-pollard
Copy link
Collaborator

@liyuj mind submitting an issue with screenshots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants