Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Does this plugin support percentage($number) as SASS does? #76

Open
gfdesign opened this issue Jun 14, 2016 · 2 comments
Open

Does this plugin support percentage($number) as SASS does? #76

gfdesign opened this issue Jun 14, 2016 · 2 comments

Comments

@gfdesign
Copy link

I am moving some .scss files to PostCSS but I came across with this rule:

.article {
  width: percentage(1/2); 
}

With this method http://sass-lang.com/documentation/Sass/Script/Functions.html#percentage-instance_method, we able to get this:

.article {
  width: 50%; 
}

I wondering if it possible to do that with your plugin?
Regards

@creeperyang
Copy link

Any further info?

@diverent2
Copy link

Hey there,

currently this isn´t an feature of precss.
However there is also a postcss plugin for that called postcss-number-functions.

IMO this potentially could get added to precss since it tries to emulate a lot of the sass features.
Until then you can just add this plugin to your postcss-plugin list :)

(Note: your plugins will be executed from bottom to top, might help if you run into issues)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants