frontendbook

UX, Mobile, Web and Product Development

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • WordPress
    • Mumrik WordPress Theme
    • NeeWee WordPress Theme
    • Plugins
      • WP-JSON
    • Themes
      • Mumrik WordPress Theme
      • NeeWee
  • About
    • Subscribe
    • Write for Us
    • Contact

Tag Archives: metadata

JavaScript CSS Parser for Custom Properties

Posted on November 22, 2008 by mattias
7

Wouldn’t it be great to have a generic CSS parser implemented in JavaScript in order to move presentational options to the stylesheet instead of having presentational and behavioural settings it in the markup. I ran across the problem the other week when I was writing a jQuery plugin for grabbing external data using getJSON-function. First I intended to only use an anchor as a bootstrap for the jQuery plugin, that worked well until the designers went Andy Warhol and started saying: Sometimes we want this generic solution to be more generic, and other times we want it to be yellow, and sometimes yellow is just not the colour we are after, yada yada. And I replied: As long as you treat those babies the same when they appear on the same page. But of course they had some crack-brain-solution where they would go bezerk on usability and treat all of these generic items as they were specific, I felt the need for some smart way to adjust the presentation via parameters, and I used John Resigs metadata plugin, which is neat when you need to treat every instance passed to a generic plugin specific. But I was a bit annoyed moving presentation settings to the markup, it would have been neat to have a non-standard css-based stylesheet for handling these kind of issues. Typical plugins that could use such a plugin is of course all lightbox-clones (it would be great to move presentation data such as width, height, position to a stylesheet) and form validation plugins and other plugins that are heavy on configuration.

I do not know if this is a good idea, I have to check for existing solutions and see what the side-effects are? Probably someone have already implemented this, but I have yet to find the solution, otherwise I might as well try to write it (and fight all the potential browser bugs that I am sure will evolve during an implementation of such a solution).

Posted in CSS, JavaScript | Tagged configuration, CSS, JavaScript, jQuery, metadata, settings | 7 Replies

About

My name is Mattias Hising. I run a Stockholm based company named 80 Ridge Street Media. I live outside Stockholm and I think it would be awesome if you contacted me with any questions at mattias at ridgestreet dot se.

Connect

  • Twitter
  • Facebook
  • LinkedIn
  • RSS Feed

Icons by jwloh

Premium WordPress Themes

ThemeForest offers premium themes for WordPress, Drupal and also high quality designs for landing pages and email templates.

Affordable Web Hosting

Promocode FRONTENDBOOK saves you $77 when you sign up for DreamHost

Recent Posts

  • Fixing SASS –watch on OS X Lion
  • Mumrik 2 – Work has started
  • If Developers Were To Try a Real Job – Carpenter
  • Action is the Killer App
  • You Can’t Fight Youth

RSS awesome.hising.com

  • "The yield statement is only used when defining a generator function … When a generator..."
  • "There are a lot of ways to ‘skin a cat’. The only thing that matters is whether you can..."
  • Best intro ever to a TV series? The Stand, intro (Don’t...
  • Teens Photograph Lego Minifigure at Edge of Space for $400 (via...
  • Mitt manifest
  • "Och i dag avgick han. Ett anonymt köpcentrum i Oskarshamn blev något av den symboliska..."
  • "Second, it’s irresistible to anticipate the future and expect the problem to grow in a certain..."
  • "Jag har känt klassföraktet i vissa kretsar. Det har varit legitimt på borgerliga ledarsidor att göra..."
  • "Och nu måste hela partiet förstå att det inte först och främst är socialdemokratin som behöver en ny..."
  • "The main reason we want to fund such startups is not to protect the world from more SOPAs, but..."

Archives

  • November 2011
  • June 2011
  • April 2011
  • March 2011
  • February 2011
  • December 2010
  • September 2010
  • July 2010
  • May 2010
  • February 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • September 2006
  • August 2006
  • July 2006

Categories

  • CSS
  • Design
  • FAQ
  • Featured
  • HTML5
  • JavaScript
  • Life
  • Links
  • Mobile
  • Mobile Web
  • Online Marketing
  • organization
  • Product Management
  • SEO
  • themes
  • tools
  • Tutorial
  • Tweets
  • Uncategorized
  • Usability
  • User Experience
  • Web 2.0
  • Web Development
  • Wordpress

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Latest Tweets

  • @nelsonicus This is the best scene of Titanic, just before they fight the iceberg http://t.co/nv0BTVS9
  • @nelsonicus I Love Star Trek
  • @nelsonicus no, you taught me well master
  • This is something that @nelsonicus taught me IRL - http://t.co/GHpv6J1c
  • @grenfeldt håller inte med dig i allt, men en bra text. Att köra företag öppnar ögonen för en del konstigheter. Keep it up.
  • "För 19 år sedan förlorade Zambia ett helt fotbollslandslag i en flygolycka i Libreville. På söndag..." http://t.co/qpsAIVit
  • @InfiniteEdgeKim …when it is about brute force.. play those unsuited disconnectors like there is no tomorrow on 18 tables at the same time
  • Ngn med erfarenhet av att köra mot Google Analytics Reporting API?
  • RT @DEVOPS_BORAT: If you are expert of BASIC or Clojure is make little of difference to hot womans.
  • RT @UlfBjereld: Genuint nyfiken fråga: När satt Fredrik Reinfeldt i en nyhetsstudio tillsammans med en ledande oppositionspolitiker sena ...
Proudly powered by WordPress