question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing css doesn't work with Sass

See original GitHub issue

Not sure if this is an issue with plyr itself or with plyr-react. The styles in the plyr repo seem much different than those here (they use scss, for starters).

Describe the bug When importing import "plyr-react/plyr.css"; no styles are imported. When copy/pasting the css rules into my own styles, our sass loader finds an error with this specific rule: margin-right: calc(-7px - -2); (which is inside of .plyr__menu__container .plyr__menu__value).

When I switch this to margin-right: calc(-7px - -2px); the styles load properly. (I’m not really even sure what this calc is trying to do)

To Reproduce Bring the plyr styles into a project with sass loader.

Desktop:

  • OS: macOS Monterey
  • Browser: Firefox 107 Using plyr-react v5.1.0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
realamirhecommented, Nov 26, 2022

hey @derochedesign, in case @chintan9 miss your message, I guess it won’t take more than a week. he occasionally publishes the latest version changes within his weekend.

2reactions
realamirhecommented, Nov 22, 2022

Hey @derochedesign, Thanks for the report

There is a closed issue in the latest release of the plyr about calc and Dart Sass https://github.com/sampotts/plyr/pull/2519/files

@chintan9 we must need to update the plyr version to ^3.7.3 and publish a newer version to fix this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import regular CSS file in SCSS file? - sass - Stack Overflow
Doing an @import in SCSS works fine for CSS files as long as you explicitly use the full path one way or another....
Read more >
Sass: @import
CSS files imported by Sass don't allow any special Sass features. In order to make sure authors don't accidentally write Sass in their...
Read more >
Including .css files with @import is non-standard behaviour ...
I work on a few projects which import css files directly from npm modules because they aren't written in scss. In my use...
Read more >
How to Use Sass import Rule to Combine SCSS/CSS ...
I call it “combination” because it combines multiples files into one file. Sass import is used to import sass and CSS stylesheets into...
Read more >
How to Use Sass with CSS - freeCodeCamp
To use an alias, you must import it by typing the alias followed by the name of the variable (&_dark). If you try...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found