-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add postcss features to make migrating sass easier (#186)
- Loading branch information
1 parent
9dd44de
commit 35c4c6a
Showing
4 changed files
with
125 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
/** | ||
* css for <%= pluginName %> | ||
* postcss allows you to | ||
* - @import relative files, they will be inlined during build | ||
* - not have to worry about prefixes, as the last 2 versions of all major browsers | ||
* and ie 11 will be automatically prefixed | ||
* With the default plugins for postcss you can | ||
* - @import files, they will be inlined during build | ||
* - not worry about browser prefixes, they will be handled | ||
* - nest selectors. This follows the css specification that is | ||
* currently out on some browsers. See https://tabatkins.github.io/specs/css-nesting/ | ||
* - custom properties (aka variables) via the var(--var-name) syntax. See | ||
* https://www.w3.org/TR/css-variables-1/ | ||
*/ | ||
|
||
|
||
/* Note: all vars must be defined here, there are no "local" vars */ | ||
:root { | ||
--main-color: red; | ||
--base-font-size: 9; | ||
--font-size: 7; | ||
} | ||
|
||
.video-js { | ||
|
||
// This class is added to the video.js element by the plugin by default. | ||
&.<%= className %> { | ||
/* This class is added to the video.js element by the plugin by default. */ | ||
display: block; | ||
|
||
& .remove-me, & .remove-me-too, &.finally-remove-me { | ||
/* examples of postcss syntax, you probably want to remove this */ | ||
|
||
color: var(--main-color); | ||
|
||
/** | ||
* Note that you have to use calc and multiply by a value with a unit | ||
* prepending the unit like `var(--base-font-size)px` or | ||
* `calc(10 * var(--base-font-size)em` will NOT work! | ||
*/ | ||
font-size: calc(var(--font-size) * 8 * var(--base-font-size) * 1px); | ||
|
||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.