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(svg-icons): default icons color #8382

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

amtins
Copy link
Contributor

@amtins amtins commented Aug 1, 2023

Description

Uses the same color as defined by the color property of the video-js class to apply to svg icons for easy customization.

.video-js {
  color: red; /* Also redefines svg icons color  */
}

Specific Changes proposed

  • set fill property to currentColor

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

Uses the same color as defined by the `color` property of the `video-js` class to apply to `svg icons` for easy customization

- set `fill` property to `currentColor`
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #8382 (31312ff) into main (d040881) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 31312ff differs from pull request most recent head 755a5ef. Consider uploading reports for the commit 755a5ef to get more accurate results

@@            Coverage Diff             @@
##             main    #8382      +/-   ##
==========================================
+ Coverage   82.68%   82.69%   +0.01%     
==========================================
  Files         113      113              
  Lines        7578     7578              
  Branches     1821     1821              
==========================================
+ Hits         6266     6267       +1     
+ Misses       1312     1311       -1     

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -11,7 +11,7 @@
background-repeat: no-repeat;
background-position: center;

fill: #FFFFFF;
fill: currentColor;
Copy link
Contributor

Choose a reason for hiding this comment

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

I could be wrong here and I haven't tested, but should this be currentcolor?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword
though, I think it's case-insensitive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wseymour15, @gkatsev thanks for the review!

Would you like me to adjust the value ? If it helps to make a decision, here's what the W3C says https://www.w3.org/TR/css-color-3/#currentcolor

Copy link
Contributor

Choose a reason for hiding this comment

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

It's always fun when docs conflict 😄 You can leave as is. No strong feelings after reading that.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, interesting that mdn doesn't document it like the spec. I would always err on the side of the spec, if possible.

@mister-ben mister-ben merged commit b95cd7a into videojs:main Aug 17, 2023
@amtins amtins deleted the fix/svg-icons-color branch November 5, 2023 16:56
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.

5 participants