Breakpoint Generator (CLI support) #13
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :)