SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist happyoink's Avatar
    Join Date
    Jan 2008
    Location
    UK
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Importing CSS3 from a separate style sheet

    Just a quick question about CSS3 and separate stylesheets. I know that for example one could put all the IE conditional comments and hacks into a separate stylesheet in order to keep things neat and valid. But could one do that with CSS3 - like if I wanted to use vendor specific properties? So if I used vendor specific properties to create text shadow, it would render my stylesheet invalid. Could I just put it into a separate stylesheet and import it the same way I could with IE specific hacks? Would that work? (Obviously I'd have to link both stylesheets from the head tag in the HTMl document!)

    Many thanks.

  2. #2
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not use the @import command? What are the reasons for adding the CSS3 elements in a different place then?
    Kind Regards,
    Glen Wheeler
    Engine | Glen Wheeler

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,567
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    IE doesn't support much CSS3 so that would be..useless really

    I'd like to know why you want to do ths in the first place though. If you want to import cSS3 from a stylesheet then just use the @import like the above poster said

    What do you neeed this for?
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  4. #4
    SitePoint Evangelist happyoink's Avatar
    Join Date
    Jan 2008
    Location
    UK
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use @import. That's not the issue. The issue is I want my main stylesheet to validate. I got the impression it won't validate if I put something like -moz-border-radius: 20px 40px; in, hence the need to put it in a separate stylesheet (which wouldn't validate but it's better than having my main stylesheet being invalid). Or am I wrong about vendor properties being invalid? I'm starting to learn CSS3 so forgive me if my question is nooby.

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,567
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    CSS3 won't go through validator because it's only supporting CSS2 at the moment (CSS3 isn't past any stage yet)

    -moz- or -o- or any other extendor will alwaysnever validate because it's a vendor extension and it's unique to each vendor. The validator throws warnings at it but it always will .
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  6. #6
    SitePoint Evangelist happyoink's Avatar
    Join Date
    Jan 2008
    Location
    UK
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Scratch my post, I think I need to put all of my CSS3 in a separate stylesheet and then import it into my main stylesheet. I got a bit confused so no worries. Thanks for the help.

    EDIT: Just been checking out the W3C CSS validator and it does validate official CSS3 such as border-radius. But thanks for answering my question anyway. I'll just use a separate stylesheet for vendor specific CSS3 and import that.


Bookmarks

Posting Permissions

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