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

Specific breakpoints in padding CSS #435

Closed
mdo opened this issue Jan 16, 2018 · 6 comments
Closed

Specific breakpoints in padding CSS #435

mdo opened this issue Jan 16, 2018 · 6 comments
Labels
Stale Automatically marked as stale. status: review needed

Comments

@mdo
Copy link
Contributor

mdo commented Jan 16, 2018

https://github.com/primer/primer/blob/a09c6573bb0db052f37055cf82c49096f57e3087/modules/primer-utilities/lib/padding.scss#L69-L84

Can this chunk of CSS be moved to a separate file by chance? Customizing our breakpoints Sass map means we can eliminate breakpoint-specific CSS when it's not needed. For example, a project I'm working on only needs up to md. However, to use any of the padding utilities, this CSS requires there to be a lg breakpoint.

@broccolini
Copy link
Member

I think that's reasonable, will add this to our next release.

@shawnbot
Copy link
Contributor

One way we could handle this is to have the breakpoint() mixin check whether the provided breakpoint exists in $breakpoints (?). We'll try to get this into 10.5.0.

@shawnbot shawnbot mentioned this issue Mar 22, 2018
20 tasks
@shawnbot
Copy link
Contributor

@mdo If I'm reading it right, this code should produce no output:

$breakpoints: ();

@include breakpoint(lg) {
  .foo { color: rebeccapurple; }
}

Can you confirm that customizing your $breakpoints variable removes those breakpoints from your build?

@shawnbot
Copy link
Contributor

^^ bump @mdo

@mdo
Copy link
Contributor Author

mdo commented Oct 22, 2018

Haven't had the time to jump into code around this again, and I'm unsure when I'll step back into it either at this point. 😬

@github-actions
Copy link
Contributor

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

@github-actions github-actions bot added the Stale Automatically marked as stale. label May 26, 2021
@github-actions github-actions bot closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Automatically marked as stale. status: review needed
Projects
None yet
Development

No branches or pull requests

3 participants