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

Support border-opacity with default border color #4277

Merged
merged 4 commits into from May 8, 2021

Conversation

adamwathan
Copy link
Member

Resolves #4261.

This PR moves the rules for adding the default border color out of preflight directly and into the borderColor plugin using addBase, making it possible to use our withAlphaVariable helper to ensure that borderOpacity utilities work with the default border class without adding a specific border-color utility. I think this actually makes way more sense anyways.

There are ways in which this is a breaking change but I am really not convinced it's a problem. It would only be a breaking change for people using Preflight without using the rest of Tailwind, or for people using Tailwind with the borderColor core plugin disabled for some reason but still expecting to be able to use border to get a border with the default border color. If this is even one person I would be amazed.

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2021

Codecov Report

Merging #4277 (a71cf25) into master (218e57f) will decrease coverage by 0.01%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4277      +/-   ##
==========================================
- Coverage   71.70%   71.68%   -0.02%     
==========================================
  Files         220      220              
  Lines        4725     4733       +8     
  Branches      780      782       +2     
==========================================
+ Hits         3388     3393       +5     
- Misses       1257     1259       +2     
- Partials       80       81       +1     
Impacted Files Coverage Δ
src/plugins/borderColor.js 60.00% <70.00%> (+1.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 218e57f...a71cf25. Read the comment docs.

@adamwathan adamwathan merged commit 4bfa21f into master May 8, 2021
@adamwathan adamwathan deleted the default-border-opacity branch May 8, 2021 10:59
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.

[Bug]: border-opacity doesn't work with default border color
2 participants