SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Location
    Ottawa ON
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Clarification: "unrecognized token in shorthand means the entire property is ignored"

    Unrecognized Tokens in Shorthand Properties
    According to CSS 1, when there is an unrecognized token in a shorthand property, the entire shorthand property setting is ignored. For example, "text-decoration: underline cross-out" is ignored because "cross-out" is not a recognized value for the text-decoration property. The text is not even underlined.
    Nothing Rendered
    Something Rendered

    style="text-decoration: underline cross-out" - Nothing Displayed
    style="text-decoration: underline; bold: cross-out" - Underlined, but not Bold

    Perhaps someone could explain the rationale of the decision not to have any of the properties displayed if one of them is not understood. It would seem that Internet Explorer's method of rendering understood tokens until one that is not understood appears would get results that are closer to what the author intended. I'm not sure what the advantage is of not rendering any of the tokens - in what case is it beneficial?

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can think of one benefit for the creator / webmaster of the site using the CSS. This enables you to spot faults in your syntax faster, because now none of the properties are rendered. When something like the color property is rendered, but the hover color (in case of a link) is not rendered, this is not so easy to spot.

    I kind of like that feature, because you need to get your full syntax right to actually make something work, you learn a lot more from that, and you have much cleaner stylesheets .

  3. #3
    SitePoint Addict
    Join Date
    Jan 2001
    Location
    Ottawa ON
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Rafe
    I can think of one benefit for the creator / webmaster of the site using the CSS. This enables you to spot faults in your syntax faster, because now none of the properties are rendered. When something like the color property is rendered, but the hover color (in case of a link) is not rendered, this is not so easy to spot.
    And the disadvantage is that it discourages innovation - browser companies can't create additions to the CSS spec. I don't think that the trade-off is worth it.

  4. #4
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by prowsej
    And the disadvantage is that it discourages innovation - browser companies can't create additions to the CSS spec. I don't think that the trade-off is worth it.
    I'll have to disagree with that. I am still waiting for the day when all browsers are standardised and additions can't be good for 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
  •