ardcore / atom-html-to-css Goto Github PK
View Code? Open in Web Editor NEWatom.io plugin: generate css from html structure
Home Page: https://atom.io/packages/html-to-css
License: MIT License
atom.io plugin: generate css from html structure
Home Page: https://atom.io/packages/html-to-css
License: MIT License
Maybe there's a package that already does this, not sure (I'm new to Atom!).
But it would be awesome if this add-on automatically generated CSS based on any inline style rules.
So for something like this:
<div class="auto-style" style="margin: 10px 0px; color: #fff; background-color: #222;">
The add-on automatically generated this:
.auto-style { margin: 10px 0px; color: #fff; background-color: #222; }
Just an idea :)
I extract code:
<label class="field-text">
<div class="field-text__name">Text</div>
<div class="field-text__input-wrap field-text__input-wrap--mod">
<input class="field-text__input" type="text" placeholder="">
<div class="field-text__help-text">Text</div>
</div>
</label>
end result:
.field-text {
&__name {
}
&__input-wrap {
}
&__input-wrap--mod {
}
&__input {
}
&__help-text {
}
}
. {
&field-text__name {
}
&field-text__input-wrap {
}
&field-text__input-wrap--mod {
}
&field-text__input {
}
&field-text__help-text {
}
}
it's a bit strange ))
it would be great if it would be possible to get the code:
.block {
&__elem {}
&__elem {
&--modifier {}
}
}
it would be great to have an option for moving after nested brackets and separator setting for BEM-modifier
From first glance it looks like this generates SCSS code rather than CSS code.
[Enter steps to reproduce:]
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: html-to-css package 0.2.2
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At /Users/blair.hendriks/.atom/packages/html-to-css/lib/html-to-css.js:64
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.generate (/packages/html-to-css/lib/html-to-css.js:64:24)
at /packages/html-to-css/lib/html-to-css.js:50:42)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:25)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1314:34)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:334:31)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
-0:30.2.0 html-to-css:generate (div.tool-panel.tree-view)
atom-beautify 0.30.3
atom-css-clean 2.21.0
autoclose-html 0.23.0
css-in-js 0.2.0
html-to-css 0.2.2
w3c-validation 0.4.0
code is not running in this package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.