GithubHelp home page GithubHelp logo

ardcore / atom-html-to-css Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 6.0 12 KB

atom.io plugin: generate css from html structure

Home Page: https://atom.io/packages/html-to-css

License: MIT License

JavaScript 100.00%
atom-html atom-package frontend-webdevelopment javascript

atom-html-to-css's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-html-to-css's Issues

error

code is not running in this package

Suggestion: create CSS style rules from inline style="style: rule"

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 :)

Parsing failed

The plugin doesn't work for at all. For all HTML is shows Parsing failed error. Even for such a simple ones:

image

Uncaught TypeError: Cannot read property 'getSelectedText' of undefined

[Enter steps to reproduce:]

  1. opened html file
  2. select html-to-css
  3. generate
  4. error thrown

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

Stack Trace

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)

Commands

     -0:30.2.0 html-to-css:generate (div.tool-panel.tree-view)

Non-Core Packages

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 

Bugs and feature-request

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

SCSS instead of CSS

From first glance it looks like this generates SCSS code rather than CSS code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.