Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15521

dynamic before content causes line break in Safari

From Chris Riesbeck <Chris.Riesbeck@gmail.com>
Newsgroups comp.lang.javascript
Subject dynamic before content causes line break in Safari
Date 2012-08-23 11:54 -0500
Message-ID <a9n5idF630U1@mid.individual.net> (permalink)

Show all headers | View raw


I have this CSS:

   li.marked:before {
     content: "+ ";
   }

I have Javascript code that puts "marked" on list items.

The problem: A line break appears right after the +
   - in Safari (MacOS and Windows)
   - when "marked" is added dynamically
   - and there's a nested list in the list item

I have a pretty minimal single file example here:

   http://www.cs.northwestern.edu/~riesbeck/demo/content-bug.html

The first list is marked dynamically and gets the line breaks on list 
items with nested lists. The second list has static "marked" items and 
looks fine.

The W3 validator just warns about HTML5 being experimental.

Have I wondered into non-standard land? Or is this a known Safari bug?

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

dynamic before content causes line break in Safari Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-08-23 11:54 -0500
  Re: dynamic before content causes line break in Safari Martin Honnen <mahotrash@yahoo.de> - 2012-08-23 19:22 +0200
    Re: dynamic before content causes line break in Safari Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-08-23 12:27 -0500

csiph-web