-
-
Notifications
You must be signed in to change notification settings - Fork 384
docs(readme): add a note about media query extraction (media-query-plugin
)
#235
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
docs(readme): add a note about media query extraction (media-query-plugin
)
#235
Conversation
media-query-plugin
)
README.md
Outdated
|
||
Afterwards a mobile user only needs to load this | ||
|
||
```scss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scss => css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this matter?
It's only about syntax highlighting and I first tried scss
but then the @
of @media
looks weird. Using css
result in the best look here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind, I just noticed you were talking replacing the 2nd scss
with css
done!
README.md
Outdated
instead of this | ||
|
||
```css | ||
.foo { color: red } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'\n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
README.md
Outdated
.foo { color: red } | ||
@media (min-width: 75em) { | ||
.foo { color: blue } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'\n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
README.md
Outdated
To improve this you can use the [media-query-plugin](https://github.com/SassNinja/media-query-plugin) which plays together well with the mini-css-extract-plugin. It will extract the defined media queries and emit them as separate files (or inject into existing chunks if working with dynamic imports). | ||
|
||
Afterwards a mobile user only needs to load this | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add 'useful/expressive' filenames for context in the following format **`useful.css`**
to all code examples, e.g `**webpack.config.js**`
to the config examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
I've now added filenames and line breaks in CSS code for better readability.
776de15
to
2f363dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SassNinja Thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too much text for promoting another plugin. The usage can be explained in the README of the plugin.
A single link with one sentence seem to be more appropriate for me.
I've added a more detailed description because @evilebottnawi asked me for an example. ### Other Webpack Plugins
This plugin plays together well with the following other webpack plugins.
#### media-query-plugin
If you'd like to extract the media queries from the extracted CSS (so mobile users don't need to load desktop specific CSS anymore) you should use the [media-query-plugin](https://github.com/SassNinja/media-query-plugin). It will take over the filename option of the mini-css-extract-plugin and recognize its generated CSS chunks. or without considering other plugins ### Media Query Plugin
If you'd like to extract the media queries from the extracted CSS (so mobile users don't need to load desktop specific CSS anymore) you should use the [media-query-plugin](https://github.com/SassNinja/media-query-plugin). It will take over the filename option of the mini-css-extract-plugin and recognize its generated CSS chunks. |
I'm in favor of the latter :)
|
alright, I've pushed the short version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SassNinja Thx
README.md
Outdated
``` | ||
|
||
For more information please check the media-query-plugin [docs](https://github.com/SassNinja/media-query-plugin) and [examples](https://github.com/SassNinja/media-query-plugin/tree/master/examples). | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not needed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed now
(hope the PR is now good to go)
media-query-plugin
) media-query-plugin
)
@michael-ciniawsky Right now good, maybe in future ( |
This PR contains a:
Motivation / Use-Case
Breaking Changes
Additional Info
This PR updates the docs/readme of this repo and adds a section about using mini-css-extract-plugin together with my media-query-plugin.
Relates to #162
@evilebottnawi is this update ok for you?