Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Do you fork your CSS?

4 members have voted

  1. 1. Which do you prefer?

    • Do not fork
      75%
      3
    • Use vendor extensions
      25%
      1

Please sign in or register to vote in this poll.

Featured Replies

I just read two articles on A List Apart and they got me thinking. The articles are about the current implimentation of CSS3 -- not what CSS3 should be, but where it currently is. Both authors take different views about whether the current state is good or bad.

 

The current state

The current state of CSS3 is that vendor extensions are necessary to acheive all the effects desired. For example, the CSS required for rounded corners currently looks like this:

.round {
   border-radius: 10px;
   -mox-border-radius: 10px;
   -webkit-border-radius: 10px;
}

The prefixes "-moz-" and "-webkit-" only work in Mozilla- and Webkit-based browsers respectively. The expansion of CSS using these vendor extension is known as "forking" and is the basis of the argument.

 

The Aaron Gustafson Argument Against Forking

Source: Stop Forking with CSS3

Aaron Gustafson argues that CSS forking is reminiscent of the darker days of JavaScript and bloats the code. He argues that writing CSS that only specific browsers understand is known as "hacking". He goes on to suggest a JavaScript library that expands upon an existing style sheet to make it cross-browser compatable without forking.

 

The Eric Meyer Argument for Vendor Extensions

Source: Prefix or Posthack

Eric Meyer argues that the repitition in code that vendor prefixes create is a necessary because the different browsers interpret the standard in different ways. He argues that they are a better solution than the box model problem we had a few years ago. He suggests that the vendor prefixes should be added to the standard and become the starting point of every new implimentation of a rule.

 

My Question to You

Which do you think is better? Do you think that CSS should be expanded using vendor extensions or keeping CSS streamlined to prefent future problems and repeated code?

 

Personally, I'm in favour of the Eric Meyer solution. I'd prefer all browsers to require prefixes on new code until the implimentation is standardised but I'm really interested in seeing what the board think. Where does the forum stand on this issue?

Not forking CSS is supporting standards compliant browsers, which is only logical thing to do.

...but realistically, some browsers are more superior than others. Why should we not have the chance to try out new stuff without waiting for the dross (IE) to catch up?

These extensions aren't meant to be a permanent fixture, simply a stop gap until the standards are defined.

No browser is saying 'this is the way we do it, like it or lump it', they're saying 'look at what you could have if this became the norm'; Which lets us all have a play about: progressive enhancement et al.

 

I like the idea made in one of the articles; have 'vendor extensions' but make them all the same;

-testing-border-radius

or whatever...

and each browser implements -testing how they wish.

Would make life simpler methinks :)

My customers wouldn't want things that work in one browser and not the other, so I don't use proprietary extensions like that.

Only similar thing I tend to use is opacity and the filter: opacity one for IE.

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.