govtrack.us-web icon indicating copy to clipboard operation
govtrack.us-web copied to clipboard

Clean up CSS

Open GPHemsley opened this issue 12 years ago • 5 comments

There are a number of redundant vendor-prefixed properties in the CSS that are not needed for modern browsers. In most cases, fallback in older browsers will not be too negatively affected, as these are mostly just style flourishes.

These properties can be simplified:

  • border-radius
  • linear-gradient
  • box-shadow
  • white-space: pre-wrap
  • border-top-right-radius
  • border-bottom-right-radius
  • border-top-left-radius
  • border-bottom-left-radius
  • background-clip

These properties are proprietary and should probably not be used:

  • -webkit-font-smoothing
  • filter (IE)
  • zoom

The use of these properties should probably be re-evaluated:

  • text-size-adjust
  • box-sizing
  • ::-webkit-input-placeholder
  • @-moz-document

GPHemsley avatar Feb 07 '13 07:02 GPHemsley

Pull request #47 addresses the issue of obsolete proprietary/experimental properties.

In the course of doing that work, I determined that proprietary properties continued to be necessary to support linear gradients on some more recent browsers.

I also determined that -webkit-font-smoothing and zoom were probably harmless to include without cross-browser support.

I added additional properties to improve cross-browser support for text-size-adjust, and re-evaluation of the other properties can be postponed to a later time.

That being said, the CSS file can do with a major cleanup, beyond simply removing or adjusting specific properties. I don't know if that should mean this issue should remain open, or if another issue should be filed.

GPHemsley avatar Apr 14 '13 18:04 GPHemsley

I didn't see this before my comment about testing on IE on the pull req.

So I'm lost: what's the current status of the pull req?

JoshData avatar Apr 17 '13 12:04 JoshData

I'm not sure what you see as conflicting or contradictory, as I made the two simultaneously. The pull request should be ready to go.

GPHemsley avatar Apr 17 '13 14:04 GPHemsley

The pull req removes the proprietary properties doesn't it? But here you're saying they're necessary.

JoshData avatar Apr 17 '13 14:04 JoshData

Oh. The comment in this issue was meant to go into more detail because I expect it to stay around longer.

Each type of property was evaluated on its merits separately, and properties were only removed if they were determined to only be needed to support old browsers.

In the case of linear gradients, certain current browsers still require the use of proprietary properties, so those have been left in.

GPHemsley avatar Apr 17 '13 14:04 GPHemsley