- From: Vincent Hardy via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 29 Oct 2011 01:00:36 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-exclusions In directory hutz:/tmp/cvs-serv670 Modified Files: Exclusions.src.html Overview.html style-toggle.js Log Message: Made style toggle work on FF/WebKit/Opera Index: style-toggle.js =================================================================== RCS file: /sources/public/csswg/css3-exclusions/style-toggle.js,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- style-toggle.js 27 Oct 2011 01:09:01 -0000 1.2 +++ style-toggle.js 29 Oct 2011 01:00:34 -0000 1.3 @@ -2,16 +2,17 @@ var defaultStyleText = 'default spec. style'; var additionalStyleText = "additional spec. style"; var toggle; - - + function toggleStyle() { var st = document.getElementById('st'); if (st.hasAttribute('disabled') === true) { st.removeAttribute('disabled'); + st.disabled = false; toggle.textContent = defaultStyleText; } else { st.setAttribute('disabled', 'true'); + st.disabled = true; toggle.textContent = additionalStyleText; } } @@ -21,10 +22,6 @@ var divHead = document.getElementById('div-head'); var defaultText = additionalStyleText; - if (st.hasAttribute('disabled') === false) { - defaultText = defaultStyleText; - } - toggle = document.createElement('a'); divHead.insertBefore(toggle, divHead.firstChild); Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-exclusions/Overview.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Overview.html 29 Oct 2011 00:33:42 -0000 1.13 +++ Overview.html 29 Oct 2011 01:00:33 -0000 1.14 @@ -9,11 +9,17 @@ <link href=default.css rel=stylesheet type="text/css"> <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet type="text/css"> - <link disabled href=alternate-spec-style.css id=st rel=stylesheet - title="additional spec styles" type="text/css"> + <link disabled href=alternate-spec-style.css id=st + rel="alternate stylesheet" title="additional spec styles" type="text/css"> <script src=style-toggle.js type="text/javascript"></script> <style type="text/css"> + + /* Alternate stylesheet fonts are here because in some browsers (Opera 11.5) */ + /* The fonts are not applied if only loaded from the alternate stylesheet */ + @import url(http://fonts.googleapis.com/css?family=Droid+Serif:700,400,400italic,700italic); + @import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono); + .singleImgExample { display: block; margin: auto; Index: Exclusions.src.html =================================================================== RCS file: /sources/public/csswg/css3-exclusions/Exclusions.src.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Exclusions.src.html 29 Oct 2011 00:33:42 -0000 1.13 +++ Exclusions.src.html 29 Oct 2011 01:00:33 -0000 1.14 @@ -7,12 +7,18 @@ <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css" /> - <link id="st" href="alternate-spec-style.css" rel="stylesheet" + <link id="st" href="alternate-spec-style.css" rel="alternate stylesheet" type="text/css" disabled title="additional spec styles"> <script type="text/javascript" src="style-toggle.js"></script> <style type="text/css"> + + /* Alternate stylesheet fonts are here because in some browsers (Opera 11.5) */ + /* The fonts are not applied if only loaded from the alternate stylesheet */ + @import url(http://fonts.googleapis.com/css?family=Droid+Serif:700,400,400italic,700italic); + @import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono); + .singleImgExample { display: block; margin: auto;
Received on Saturday, 29 October 2011 01:00:42 UTC