[wp-trac] [WordPress Trac] #14243: Content of css interfering with functions

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 12 19:09:30 UTC 2010


#14243: Content of css interfering with functions
--------------------------+-------------------------------------------------
 Reporter:  matveb        |       Owner:                        
     Type:  defect (bug)  |      Status:  new                   
 Priority:  lowest        |   Milestone:  Awaiting Review       
Component:  Themes        |     Version:                        
 Severity:  minor         |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by mdawaffe):

 Replying to [comment:2 nacin]:
 >Additionally, # is valid as a PHP comment, so we couldn't exclude it, as
 someone could be doing this:
 >
 {{{
 #Theme Name: test
 #Description:
 #Author:

 #status:hover { ...
 }}}


 # is not a valid CSS comment.
  http://www.w3.org/TR/CSS/syndata.html#comments
  http://www.w3.org/TR/css3-syntax/#comments

 I think we should force authors to use the /* */ style comment as that's
 the only valid CSS comment syntax.

 I have no idea how fast/slow the tokenizer is, but these aren't PHP files,
 so it's not really the "right" tool.

 Suggested regex:

 {{{/^(\s|\*)*{field name}:(.*)$/mi}}}

 That will pick up

 {{{
 /*
 Theme Name: Test
 Template: twentyten
 */
 }}}

 and

 {{{
  /*
   * Theme Name: Test
   * Template: twentyten
   */
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14243#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list