Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Cant hide/outcomment @import from safari

    If i have a stylesheet to import stylesheett and try to hide/outcommen one of those safari insist on reading it annyway

    @import url("colours.css");
    /* @import url("lightcolours.css"); */

    Why cant i hide/outcomment the lightcolours.css ??
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Why not just delete it?

  • #3
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    1. becaus im wondering why it reads it

    2.
    Im working on at style where site admin shud have the choise between normal and light version, so was thinking of:

    @import url("colours.css");
    /*
    @import url("lightcolours.css");
    Enable lightcolours.css stylesheet import for alternativ light version
    */

    insted of sending 2 versions
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #4
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Is this within <style> tags?

    Also it would just make sense to use <link> rather than @import which was just the old way to avoid very old browsers but it's usage is pretty redundant now..then you can comment them out using normal HTML comment tags

  • #5
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    No ... its inside a stylesheet

    i link to one stylesheet and frome that import multiple stylesheets
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #6
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    I just tested and I can confirm commenting out @import within an external stylesheet works fine in Safari 4 on Win XP for me?

    What version of Safari are you using and can you post up the whole code?

    Also might be worth running your CSS and HTML through the validator

  • #7
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Safari 4.0.5 on mac OSX 10.5.8

    Im working on a phpBB forum style

    this is the main stylesheet code.. and it do validate

    Code:
    /*  
    	phpBB 3.0 Style Sheet
    	------------------------------------------------------------------------	
    	Style name:		 Psychedelia
    	Based on style: 	 proSilver Special Edition
    	Original author: 	 subBlue ( http://www.subBlue.com/ )
    	Modified by:		 JGOM © 2010 ( http://www.phpBB2.dk/ ) 
    	
    	Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
    	------------------------------------------------------------------------
    */
    
    @import url("common.css");
    @import url("links.css");
    @import url("content.css");
    @import url("buttons.css");
    @import url("cp.css");
    @import url("forms.css");
    @import url("tweaks.css");
    @import url("changes.css");
    @import url("colours.css");
    
    
    /*
    @import url("lightcolours.css"); 
    Enable lightcolours.css stylesheet import for
    alternativ light version of Psychedelia
    */
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #8
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    I have tested difrent versions of the outcomment like

    /* @import url("lightcolours.css"); */

    Cant get Safari to overlook it
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #9
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Is there any chance of a link? At least I can then test/debug it from my end..if you don't want SE to pick it up you can use tinyurl or just PM it me if worried otherwise.

  • #10
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    It aint online yet ... but i can see if i can do somthing
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #11
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    I have don the same to a live board now .. same result .. safari on mac shows the outcomment testcolours.css

    http://www.dansk-kanin.dk/index.php
    Color in copyright info at the bottom shud be purple but in the test stylesheet i made it blue

    main stylesheet
    Code:
    /*  phpBB 3.0 Style Sheet
        ------------------------------------------------------------------------
    	Style name:			Purple Rabbit
    	Based on style:		proSilver Special Edition
    	Original author:	subBlue ( http://www.subBlue.com/ )
    	Modified by:		© JGOM, 2010 ( http://www.phpBB2.dk/ ) 
    	
    	Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
    	
    	The Purple Rabbit style is based on the proSilver SE style and use the
    	original proSilver SE stylesheets with the exception of the colours.css.
    	All code changes to the original proSilver SE stylesheets are made in 
    	the changes.css The whole Purple Rabbit style is in the colours.css.
    	------------------------------------------------------------------------
    */
    
    @import url("common.css");
    @import url("links.css");
    @import url("content.css");
    @import url("buttons.css");
    @import url("cp.css");
    @import url("forms.css");
    @import url("tweaks.css");
    @import url("changes.css");
    @import url("colours.css");
    
    /* @import url("testcolours.css"); 
    Test style*/
    testcolours.css:
    Code:
    /* Test styles
    ---------------------------------------- */
    .copyright, .copyright a {
        color: #0000ff !important;
    }
    
    .copyright a:hover {
        color: #ff0000 !important;
    }
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #12
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    When looking in safari's developer tools i can see the generated/imported stylesheet

    it ends like this:
    Code:
    /* /* Test styles
    ---------------------------------------- */
    .copyright, .copyright a {
        color: #0000ff !important;
    }
     
    .copyright a:hover {
        color: #ff0000 !important;
    } 
    Test style*/
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #13
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Remove all comments from the imported stylesheet. This may be a flaw in WebKit's CSS comment rendering.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •