Skip to content
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

import resetcss #8

Closed
chharvey opened this issue Oct 3, 2016 · 0 comments
Closed

import resetcss #8

chharvey opened this issue Oct 3, 2016 · 0 comments

Comments

@chharvey
Copy link
Owner

chharvey commented Oct 3, 2016

My own resetcss will probably never be used outside of Xmeter. If considering otherwise, I suggest using an alternate reset stylesheet instead. There are many similar third-party projects, such as:

resetcss is great, but it's too simple to be a standalone project. Since it is a dependency on Xmeter, may as well import the code directly into the project. Here's how it would work:

  1. copy-paste reset.less into this project

  2. change in package.json:

    - "lessc:xmeter": "lessc-each src/ build/  &&  lessc xmeter.less xmeter.css",
    + "lessc:xmeter": "lessc-each src/ build/  &&  lessc reset.less reset.css  &&  lessc xmeter.less xmeter.css",
  3. change in xmeter.less:

    - @import (inline) url('node_modules/resetcss/reset.css');
    + @import (inline) url('reset.css');
  4. in xmeter.less, keep the already-present @import (inline) url('node_modules/normalize.css/normalize.css');, as is, after the import of reset.css. This is because the normalize styles should apply after the reset styles.

  5. when compiled, xmeter.css will have the following components:

    • the inline content of reset.css
    • the inline content of normalize.css
    • the inline content of each compiled partial of Xmeter (see /build/ directory)

OPTION: reset.less is syntactically valid CSS. Is it worth it to keep the less file and necessarily compile in the build process? Or should the source code be plain old CSS?

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

No branches or pull requests

1 participant