-
Notifications
You must be signed in to change notification settings - Fork 10
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
Breakpoint Generator (CLI support) #13
base: master
Are you sure you want to change the base?
Breakpoint Generator (CLI support) #13
Conversation
@zehfernandes 100% absolutely love this. I've only just had a quick glance at the code and the concept, but this is exactly what we'd like to incorporate into the project (via options of course). We've come across use cases to not only change media queries, but to add them as well. If a project wants to have 4, 5, or even more breakpoints we would love to provide an official mechanism. Tachyons should be able to target watches and televisions, too 😎 . This will especially fit in nicely for some future Tachyons projects we're working on:
It will be a day or two before I can give a thorough review and start the process of adding this to the next version of the cli. But, I wanted to let you know that I love where this is headed and that you can expect a more formal response with review in the next 24 to 72 hours. Thanks! 🍻 💯 |
OHH! This JSON config file is amazing. 😍 |
Update: The output code of .pa0 { padding: var( --spacing-none ); } The plugin postcss-css-variable has an issue MadLittleMods/postcss-css-variables#27 about the CSS4 spec considering FIXED using Perfectionist |
Hey,
To solve the problem of creating new breakpoints and update them along the project. I try to create the most unobtrusive breakpoint generator. I love the simplicity and the independence of each tachyons step. So I try to respect that:
tachyons-cli
@customMedias
from the file. You can use with _variables.css, _media-queries or the module css file_typography.css
and forget some breakpoint, the code will maintain your code and add the new media query.tachyons-css
remain. Everything happens pre-build.How it works
I wrote a generic postcss plugin called postcss-update-media-queries a specific wrap module tachyons-build-mediaquerie to help the
tachyons-cli
functions.Usage
input
output
Look at tachyons-bulild-mediaqueries to see more.
Future thoughts
Has a lot of things to improve like error messages, return promises (to have a better control), ES6 standard, decent tests, naming...
But taking a look and see if is useful for the major project.
P.S: @johnotander I read a lot of your code to have insights to do that. Thanks :)