You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,10 @@ Features:
13
13
14
14
- no performance issues since it listens only on size changes of elements that have element query rules defined through css. Other element query polifills only listen on `window.onresize` which causes performance issues and allows only to detect changes via window.resize event and not inside layout changes like css3 animation, :hover, DOM changes etc.
15
15
- no interval/timeout detection. Truly event-based through integrated ResizeSensor class.
16
+
- automatically discovers new DOM elements. No need to call javascript manually.
16
17
- no CSS modifications. Valid CSS Syntax
17
-
- all CSS selectors available. Uses regular attribute selector. No need to write rules in HTML.
18
-
- supports and tested in webkit, gecko and IE(7/8/9/10/11)
18
+
- all CSS selectors available. Uses regular attribute selector. No need to write rules in HTML/JS.
19
+
- supports and tested in webkit, gecko and IE(10+)
19
20
-`min-width`, `min-height`, `max-width` and `max-height` are supported so far
20
21
- works with any layout modifications: HTML (innerHTML etc), inline styles, DOM mutation, CSS3 transitions, fluid layout changes (also percent changes), pseudo classes (:hover etc.), window resizes and more
21
22
- no Javascript-Framework dependency (works with jQuery, Mootools, etc.)
@@ -50,7 +51,7 @@ More demos and information: http://marcj.github.io/css-element-queries/
50
51
51
52
As you can see we use the `~=`[attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
52
53
Since this css-element-queries polyfill adds new element attributes on the DOM element
53
-
(`<div class="widget-name" min-width="400px 700px"></div>`) depending on your actual CSS,
54
+
(`<div class="widget-name" min-width="400px 700px"></div>`) depending on your actual CSS and element's dimension,
54
55
you should always use this attribute selector (especially if you have several element query rules on the same element).
55
56
56
57
```html
@@ -104,6 +105,7 @@ ElementQueries.init();
104
105
- So far does not work on `img` and other elements that can't contain other elements. Wrapping with a `div` works fine though (See demo).
105
106
- Adds additional hidden elements into selected target element and forces target element to be relative or absolute.
106
107
- Local stylesheets do not work (using `file://` protocol).
108
+
- If you have rules on an element that has a css animation, also add `element-queries`. E.g. `.widget-name { animation: 2sec my-animation, 1s element-queries;}`. We use this to detect new added DOM elements automatically.
0 commit comments