Skip to content

Fixed the dynamic stylesheets demo from an article on Sitepen

Notifications You must be signed in to change notification settings

tomelam/split_panel_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Dynamic Stylesheets Demo from Sitepen.com

A sitepen article by Dojo Toolkit contributor Sam Foster, Dynamic Stylesheets, Part 1, links to a demo of dojox.html.style, which, as Sam says, "give you the ability to query the stylesheets collection in a document, add and remove rules, and dynamically create new sheets." The article is brilliant, but it is so old that the source file for Dojo that the demo includes has already been removed. This Git project has been created to resurrect the demo.

System dependencies

Version 1.13.0 of Dojo. The file index.html uses Google's API CDN to source this.

How to understand this dynamic stylesheet demo

Clone this repository. Browse demo. Open the browser's developer tools. Play with the reset and present buttons and the "nubbin" (small, blue, inverted pyramid) to adjust the relative sizes of the pink and blue table (built using <div>s) and watch the style of the <div> element with id "dv1" change as you make the adjustments. Add rows to the table by pressing the "+" button to verify that the new row is using the same styles as the first row.

Summary

This demo of dynamic stylesheets is mainly for just that: a demo. However, the code is there to be copied and used if someone finds it useful.

To Do

  • It would be nice to have various versions of this demo for newer libraries. Version 1.13.0 of Dojo might seem to be old.

  • The capability of saving the modified styles in a CSS file on a website's backend would an interesting feature.

About

Fixed the dynamic stylesheets demo from an article on Sitepen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages