npm-dom / dom-style Goto Github PK
View Code? Open in Web Editor NEWLibrary to manipulate CSS properties
Home Page: http://npm.im/dom-style
Library to manipulate CSS properties
Home Page: http://npm.im/dom-style
seems like dom-style is the go to. You should deprecate style-dom in npm and point to dom-style in the deprecation message.
style.show
won't work in IE: https://developer.mozilla.org/en-US/docs/Web/CSS/initial#Browser_compatibility
Right now show() is the same as style(el, 'display', 'inline')
which makes it pretty useless if you're using anything other than an inline element.
Looking at jQuery, they seem to cache the previous display value. It's fairly nasty and probably better suited in a separate module... opening up here to see if you guys have any further insight?
https://github.com/jquery/jquery/blob/895ea6887dd02a44067d041db00c355c80e930a3/src/css.js#L153
Has to be cssFloat
(or styleFloat
for IE 8, if support is wanted): https://developer.mozilla.org/en-US/docs/Web/CSS/float
If you're referring to this property from JavaScript as a member of the
element.style
object, you must spell it ascssFloat
. Also note that Internet Explorer versions 8 and older spelled thisstyleFloat
. This is an exception to the rule that the name of the DOM member is the camel-case name of the dash-separated CSS name (and is due to the fact that "float" is a reserved word in JavaScript, as with the need to escape "class" as "className" and escape 's "for" as "htmlFor").
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.