We're Moving. So, we've disabled new registrations on this forum. The forum will not officially be released until 8 PM Pacific Standard Time (Friday, Sept, 9th, 2010)~ http://www.ego-one.net/

View previous topicView next topicGo down††Message [Page 1 of 1]

avatar

MrMario
Manager
Keith Clark, an independent web developer from the UK, has developed a JavaScript solution to IEís CSS3 shortcomings in relation to CSS3 selectors. CSS3 selectors became the first W3C module to reach proposed recommendation status back in December 2009.

His ie-css3.js project (currently in beta) allows Internet Explorer, versions 5 through 8, to identify CSS3 pseudo selectors and render any style rules defined with them. All this is achieved by simply including the script, along with Robert Nymanís DomAssistant, within the head element of your web pages.

Supported Selectors

  • :nth-child
  • :nth-last-child
  • :nth-of-type
  • :nth-last-of-type
  • :first-child
  • :last-child
  • :only-child
  • :first-of-type
  • :only-of-type
  • :empty

Limitations of the project

  • Style sheets MUST be added to the page using atag. Page level stylesheets or inline styles wonít work. You can still use @import in your style sheets.
  • Style sheets MUST be hosted on the domain as the page.
  • Style sheets using file:// protocol will not work due to browser security restrictions.
  • The :not() pseudo selector is not supported.
  • The emulation is not dynamic. Once the styles are applied they are fixed so changes to the DOM wonít be reflected.

How does it work?

ie-css3.js downloads each style sheet on the page and parses it for CSS3 pseduo selectors. If a selector is found itís replaced by CSS class of a similar name. For example: div:nth-child(2) will become div._iecss-nth-child-2. Next, Robert Nymanís DOMAssistant is used to find the DOM nodes matching the original CSS3 selector and the same CSS class is applied them. Finally, the original stylesheet is replaced with the new version and any elements targeted with CSS3 selectors will be styled.

Bypassing IEís CSS parser

In accordance with the W3C specs, a web browser should discard style rules it doesnít understand. This presents a problem ó we need access to the CSS3 selectors in the style sheet but IE throws them away. To avoid this issue each style sheet is downloaded using a XMLHttpRequest. This allows the script to bypass the browsers internal CSS parser and gain access to the raw CSS file.

Find out more and Download


ie-css3.js is released under the MIT License and can be downloaded from the project page on Keith Clarkís website. Youíll also need to download Robert Nymanís DOMAssistant.

Found => Here




No Comment.

View previous topicView next topicBack to top††Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum




Site powered by Forumotion
Copyright 2006-2013 | JalokimGraphics | Ego-One
<!-- <script type="text/javascript"> var vglnk = { key: '0d80ae9fe71cec9484f682bd59232f9e' }; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; s.src = '//cdn.viglink.com/api/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script')); </script><script type="text/javascript"> document.write('<scr' + 'ipt data-cfasync="false" type="text/javascript" src="https://www.adexchangeguru.com/a/display.php?r=1242764"></scr' + 'ipt>'); </script> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({flush: true}); </script></body></html><strong><a href="http://www.how-to-make-forum.com" target="_blank">How to make a forum</a></strong>&nbsp;|&nbsp;<span class="gensmall">&copy;</span> <a href="https://www.forumotion.com/punbb" target="_blank">PunBB</a>&nbsp;|&nbsp;<a name="bottom" href="http://help.forumotion.com/" target="_blank">Free forum support</a>&nbsp;|&nbsp;<a href="/abuse?page=%2Ft884-css3-pseudo-selectors-emulation-in-internet-explorer&amp;report=1" rel="nofollow">Report an abuse</a>&nbsp;|&nbsp;<strong><a href="http://www.forumotion.com" target="_blank">Free forum</a></strong>Derp