css file modularize
See original GitHub issueantd
src
├── README.md
├── components
│ ├──button
│ ├── style
│ ├── index.js
│ ├── index.less
│ ├── index.js
│ ├──dropdown
│ ├── style
│ ├── index.js
│ ├── index.less
│ ├── index.js
├── style
│ ├──index.js
│ ├──index.less
│ ├──effect.less
│ ├──variable.less
│ ├──mixin.less
style/index.js
import 'normalize.css';
import './index.less'
button/style/index.less
@import '../../style/variable.less';
@import "../../style/mixin.less";
// button' less
button/style/index.js
import "./index.less";
dropdown/style/index.less
@import '../../style/variable.less';
@import "../../style/mixin.less";
// dropdown' less
dropdown/style/index.js
import "../../button/style";
import "./index.less";
publish antd
├── lib
│ ├──button
│ ├── style
│ ├── index.js
│ ├── css.js
│ ├── index.less
│ ├── index.css
│ ├── index.js
├── style
│ ├──css.js
│ ├──index.css
│ ├──index.js
│ ├──index.less
│ ├──effect.less
│ ├──variable.less
│ ├──mixin.less
style/css.js
require('./index.css');
lib/button/style/css.js
require('./index.css');
using antd
source
entry
import 'antd/style';
component A
import {dropdown} from 'antd';
compile using babel-antd
entry
require('antd/style');
component A
var Dropdown = require('ant/lib/dropdown');
require('antd/lib/dropdown/style')
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:18 (10 by maintainers)
Top Results From Across the Web
What is Modular CSS? - Space Ninja
Modular CSS simplifies code and facilitates refactoring. It produces self-documenting code. It results in reusable code that doesn't influence ...
Read more >What are CSS Modules and why do we need them?
According to the repo, CSS modules are: CSS files in which all class names and animation names are scoped locally by default. So...
Read more >A Quick Guide To Modular CSS – Don't Be Petty, Write Less ...
The idea behind modular CSS is to write specific styles that serve a single purpose within a given scope with less general classes...
Read more >Modularizing CSS files - Stack Overflow
The best solution is to write a script that combines (and minifies) multiple CSS or JS files.
Read more >30 Second Overviews of 4 Modular CSS Approaches
Modular CSS is approach of breaking down webpage styling into smaller independent components that are consistent, reusable and hold on to its ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
babel-plugin-antd折腾了一天还是不行,唉,东西是好东西,可惜文档太差!
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.