madrobby / zepto

Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API
http://zeptojs.com
Other
15k stars 3.91k forks source link

Problem pulling style info from css pseudo-elements #1149

Open lisabaut opened 8 years ago

lisabaut commented 8 years ago

I want to retrieve the 'content' property of a ':before' element. If I write vanilla JavaScript without including Zepto it is working. As soon as I include the Zepto library the result is 'none' although the actual code is not using Zepto at all.

Working example with vanilla JavaScript: http://codepen.io/lisabaut/pen/YyMJRb

Example with same code but Zepto library included (see Settings > JavaScript > Add External JavaScript): http://codepen.io/lisabaut/pen/dYLgwr If I change the code and select e.g. the 'color' property of the pseudo-element I get the correct result. If I want to return the 'content' property the result is 'none'.

Note: The original tutorial code and idea can be found here: https://www.lullabot.com/articles/importing-css-breakpoints-into-javascript

madrobby commented 8 years ago

@mislav is this something we need or want to support?

chris-oreilly commented 7 years ago

Seems to be fixed in v1.2.0 https://codepen.io/anon/pen/zdZNWj