0

Which is best css tips ?

Comments
  • 1
  • 0
  • 4
    body {
    display: none;
    }
  • 4
    * {
    position: absolute;
    opacity: 0.7;
    }
  • 4
    When will you learn to type these questions where you hopefully meant to, as in a search engine?
  • 3
    If you are patient enough to type your question here and post it and wait for response which you know won't help you, why on earth can't you search on internet?
  • 1
    Avoid using "important"
  • 1
  • 0
    for pure css:

    * custom properties -> for easier color and style switching, kinda work like variables

    * media queries -> define breakpoints for different devices, dont forget landecape mode. use the device emulation in your browser for testing.

    * filters -> for extra fancy effects, such as frosted glass, be warned: uses a lot of computing power

    * transitions -> for making shit smoothly animated (works well with custom properties and simple js)

    * keep the difference between classes and ids in mind

    * selectors aren't scary, if you know atleast a few of them

    * also half of the stuff doesn't work on browsers, that are older than you. sometimes there are vendor specific extensions for it though. look at caniuse.com for compatibility
  • 0
    Don't use css use scss
  • 0
    @thebiochemic Talking about caniuse.com, display the table as "Date relative". If something has just been starting to be supported (say, last year or the year before) don't use it. The rest is fine, who doesn't update their browsers in 3 years? I've had phones that lasted less.
    Of course there are cases where you can't ignore certain browsers or versions, that's out of reach for this analysis.
Add Comment