by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:20
    ai closed #1324
  • 05:20
    ai commented #1324
  • 05:19

    ai on ose

    Allow to set function to map.an… (compare)

  • 05:07
    ai commented #1371
  • 05:06
    ai closed #1371
  • 05:06
    ai commented #1371
  • 04:50
    ai closed #1345
  • 04:50
    ai commented #1345
  • 04:22

    ai on ose

    Export public classes from main… Remove ESLint config to devDepe… Add ESM support (compare)

  • Jul 12 07:07

    ai on ose

    Update Size Limit (compare)

  • Jul 12 07:07

    ai on ose

    (compare)

  • Jul 12 04:45

    ai on ose

    Remove CHANGELOG.md from npm pa… (compare)

  • Jul 11 05:13

    ai on ose

    Fix yarn support Move Container test to TS (compare)

  • Jul 11 03:22

    ai on ose

    Move Node test to TS (compare)

  • Jul 11 03:01

    ai on ose

    Move postcss test to TS (compare)

  • Jul 11 02:56

    ai on ose

    Move map test to TS (compare)

  • Jul 11 02:45

    ai on ose

    Move visitor test to TS (compare)

  • Jul 11 02:39

    ai on ose

    Remove npm-upgrade Add smarter types for Root#on Add types tests (compare)

  • Jul 11 01:55

    ai on ose

    Try Yarn 1 (compare)

  • Jul 11 01:52

    ai on ose

    (compare)

Evilebot Tnawi
@evilebottnawi
webpack and many other tools have the same problem too, no good response from source-map developers
Jonathan Neal
@jonathantneal
Is there an alternative tool?
CC-4477
@CC-4477
hello everyone, I'm trying to set up PostCSS with my Github Pages site. is there a guide on how to do this? I can only find things concerning Sass
Andrey Sitnik
@ai
@CC-4477 the easiest way is to add Parcel build tool (it already have good PostCSS support), create a postcss.config.js config with the list of th plugins and deploy Parcel dist/ folder to GitHub Pages
here is an example guide of Parcel + GitHub Pages https://www.sitepoint.com/parcel-hyperapp-github-pages/
guide of adding PostCSS to Parcel https://parceljs.org/css.html#postcss
And I recommend to add Stylelint (PosTCSS-based tool to find mistakes in your CSS) to your text editor according to this guide https://hackernoon.com/setting-up-css-stylelint-on-visual-studio-code-85s32l0
CC-4477
@CC-4477
thanks! I'll take a look
Carlo Ascani
@2pxsolidblack_gitlab
Hi all, may be possible to someway make a custom media available everywhere in every css file I have?
Gavin McFarland
@limitlessloop

Hi @2pxsolidblack_gitlab something like this plugin might help you, there might be others.

https://www.npmjs.com/package/postcss-global-vars

Carlo Ascani
@2pxsolidblack_gitlab
thx!
Andrey Sitnik
@ai
@RyanZim I found why we recently have the problem with result.map is not string. It happens because Node.js < 14 call .toString() on options passed to writeFile, but Node.js 14 starts to excplicitly check that it is a string
Ryan Zimmerman
@RyanZim
That's what I thought might be the case.
Jonathan Lorimer
@JonathanLorimer
Has anyone solved the issue with postcss-imports and postcss-mixins?
Kirill Lyzhenkoff
@Lyzhenkoff
Hi!I have problems with adding images to postcss.I write a right link to image but I have error
Andrey Sitnik
@ai
@JonathanLorimer what issue do you talk about? Post your PostCSS config, CSS input, current and expected output
@Lyzhenkoff show you input CSS, PostCSS plugins and the error
Jonathan Lorimer
@JonathanLorimer
I think I actually sorted it out. I am doing a big port from webpack 3 to webpack 5 and somehow I the old configuration they were defining mixins globally? I just needed to add the correct imports. Thanks for the response!
Brian Hogue
@syzygy333
Hi, I'm using postcss and precss, which includes postcss-advanced-variables and in my guplfile I'm piping precss first and I keep getting Could not resolve the variable .... Didn't find much helpful googling around.
Andrey Sitnik
@ai
@syzygy333 sorry, have no time or experience in this plugin. Try to look into the sources. Most of PostCSS plugins are very simple inside
Jonathan Neal
@jonathantneal
I originally created that plugin. Feel free to DM me if you have to debug it. I had been looking for other maintainers for years. I’m still willing to offer assistance.
Mattias Hällkvist
@emattias
Does postcss have an api to check if a value is a color value?
Andrey Sitnik
@ai
@emattias PostCSS core has no this API
but postcss-value-parser may have it
Mattias Hällkvist
@emattias
@ai thanks! Seems like postcss-value-parser doesnt support scss. Is that corrects?
Andrey Sitnik
@ai
@emattias nope :(
but I am not sure
Mattias Hällkvist
@emattias
ok, how can I with postcss get the value of a sass variable?
Andrey Sitnik
@ai
@emattias postcss doesn’t parse SCSS too
you need to use postcss-scss parser
this parse parses $var: 1 as a $var declaration with 1
so it doesn’t really execute SCSS
if you have color: $black in SCSS, you will have { prop: 'color', value: '$black' }
Mattias Hällkvist
@emattias
I want to build a stylelint plugin to only allow using a specified list of sass-variables for color values
Andrey Sitnik
@ai
yeap, you can do it
you can use simple regexp to find a variable name in decl.value
Mattias Hällkvist
@emattias
Ok, thanks!
Mattias Hällkvist
@emattias
what are ways to get all the sass variables defined in a file?
Andrey Sitnik
@ai
@emattias
root.walkDecls(decl => {
  if (decl.prop.startsWith('$') {
    console.log(decl.prop)
  }
})
Mattias Hällkvist
@emattias
Thanks!
mrAzay
@mrAzay
I use the precss. How to import a css file with variables so that other files see these variables?
Andrey Sitnik
@ai
@mrAzay use postcss-import to inject CSS files with variables into all files which will use this variables
another way is to use variables option
Vinay
@vinaypillai
For anyone who's interested I recently wrote an RGB/HEX/HSL/XYZ/LAB/LCHab color converter: https://github.com/vinaypillai/ac-colors
https://dev.to/vinaypillai/lch-colors-and-why-you-should-be-using-them-plus-a-package-to-help-bbc
Jonathan Neal
@jonathantneal
@vinaypillai how does it compare to https://github.com/jonathantneal/convert-colors? I’m open to consolidating if there are issues you’ve found and resolved.
behnam rahmani
@b-rahmani
hi -in set autoprefixer but it not work "postcss --use autoprefixer -c option.json css/style.comp.css -o css/style.prefix.css
Ryan Zimmerman
@RyanZim
-c option sets directory to look for postcss config files with standard config names: https://github.com/michael-ciniawsky/postcss-load-config#usage
Also, either you're going to want to use a config file OR the --use option, not both
If after changing that, it's still not working, post an example snippet that isn't getting prefixed, your autoprefixer version, and browserslist config.
ShadyMind
@ShadyMind
Hi everybody! I cant find solution, how collect css variables from all passed files to one variable and after handling all files write collected data to file. Can anyone tell me where to dig for solution?