Export to GitHub

iui - issue #339

Request CSS selectors be converted to classes


Posted on Apr 16, 2012 by Quick Bear

What steps will reproduce the problem? 1. Create a group list with a form anywhere in it

What version of the product are you using? On what operating system? iUI 0.40beta2

Please provide any additional information below.

I would ask that the selectors for styling items be changed from this format:

body > ul > li > a { background: url(listArrow.png) no-repeat right center; }

to something like this

.listitem { background: url(listArrow.png) no-repeat right center; }

That way the styling is more universal and it will not cause issues if you put elements within or around the unordered list, for instance I am trying to put a form in the page but i cannot because then the CSS selector will not match.

Comment #1

Posted on Apr 17, 2012 by Swift Monkey

I think the parent/child dependencies could be relaxed a bit. We are also considering using LESS to create a "meta theme" in iUI 0.5 -- see Issue #331. If we use LESS there will be increased flexibility for customizing the CSS to add classes or apply styles in different ways (e.g. through mix-ins)

I general iUI tries to use positional CSS to keep the markup lightweight -- since iUI is a mobile website framework - not intended to add-on to existing sites. That said, I understand what you are asking for and it is not unreasonable. I really believe that using LESS will allow us (and you, through customization) to address your request.

Comment #2

Posted on Jul 22, 2012 by Swift Monkey

This issue will be (partially addressed) by addressed by the LESS implementation in 0.5. We will also work to relax some of the strict parent > child relationships at that time as well.

Status: Duplicate

Labels:
Type-Enhancement