<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16700</bug_id>
          
          <creation_ts>2012-04-11 12:04:21 +0000</creation_ts>
          <short_desc>Validating with CSS 1 Profile always reports an error</short_desc>
          <delta_ts>2012-09-21 14:46:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>CSS 1.0</component>
          <version>CSS Validator</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Radu Coravu">radu_coravu</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>caribou</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66614</commentid>
    <comment_count>0</comment_count>
    <who name="Radu Coravu">radu_coravu</who>
    <bug_when>2012-04-11 12:04:21 +0000</bug_when>
    <thetext>If I valida a simple CSS like:

a{
 margin-top: 0;
}

with the profile set to CSS 1, this error is reported:

org.w3c.css.util.InvalidParamException: unrecognized media all 
org.w3c.css.util.InvalidParamException: unrecognized media all 
	at org.w3c.css.media.css1.AtRuleMedia.addMedia(AtRuleMedia.java:27)
	at org.w3c.css.css.StyleSheetParser.addMedias(StyleSheetParser.java:242)
	at org.w3c.css.css.StyleSheetParser.parse(StyleSheetParser.java:468)


In a previous CSS Validator version the StyleSheetParser class contained the following code:

if (media == null) {
                if (ac.getCssVersion() != CssVersion.CSS1) {
		if (ac.getMedium() == null) {
		    media = &quot;all&quot;;
		} else {
		    media = ac.getMedium();
		}
	    }

But the clause &quot;ac.getCssVersion() != CssVersion.CSS1&quot; was removed in the latest version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73053</commentid>
    <comment_count>1</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2012-08-30 09:23:29 +0000</bug_when>
    <thetext>The code you provide is in the actual version, so the media all must be set somewhere else, if it still fails. (I noticed an issue with form submission on the cssval so that might be linked).
For this bug report, as the code you want to re-add is already there, it is ok to close this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73058</commentid>
    <comment_count>2</comment_count>
    <who name="Radu Coravu">radu_coravu</who>
    <bug_when>2012-08-30 09:44:39 +0000</bug_when>
    <thetext>Sure Yves, no problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>