Skip to content
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

fix: button style margin set zero globally #8426

Closed
wants to merge 1 commit into from

Conversation

Djunnni
Copy link
Contributor

@Djunnni Djunnni commented Dec 11, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

in safari, button element default margin left and right set 2px;
스크린샷 2022-12-11 오후 10 04 21

but Chrome and firefox were not set 2px;
스크린샷 2022-12-11 오후 10 05 46
스크린샷 2022-12-12 오전 1 27 39

so i check how to use in facebook.

they are using static style sheet by cdn
(https://static.xx.fbcdn.net/rsrc.php/v3/yC/l/0,cross/xv165oDvQLn.css?_nc_x=Ij3Wp8lg5Kz)

in there set

button {
 margin: 0
}

if we set this, we can remove css that some of button set margin: 0

i set default value in theme/Layout/styles.module.css but i think it's not best.
could you advice about that?

Related issues/PRs

none

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 11, 2022
@netlify
Copy link

netlify bot commented Dec 11, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit bbdd475
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63960615219b3b0009057c04
😎 Deploy Preview https://deploy-preview-8426--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 83 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 73 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber
Copy link
Collaborator

slorber commented Dec 14, 2022

Thanks

Unfortunately changing such global styling is likely to affect some users so I'd rather avoid doing this as a casual bug fix but rather as a general overhaul of the CSS reset we use in Infima, and including this in a well-documented major release of Docusaurus.

The good place to do that is here: https://github.com/facebookincubator/infima/blob/main/packages/core/styles/common/base.pcss

See also useful tools:

For Docusaurus, I'm not against an immediate fix but only for our own theme buttons, on a case-by-case basis, ie apply this locally with className instead of using a global element rule.

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

Successfully merging this pull request may close these issues.

None yet

3 participants