Skip to content

parmeet1402/30-days-of-css

Repository files navigation

Notes

  • Day - 28 - Optimizing CSS

    1. Code Better
      Crap in, Crap Out i.e. if you write bad code, bad output will be coming out.

      1. Use Shallow selectors
        Try to be as general as possible when using selectors.

      2. Organize your code
        Put Table of Contents in top of stylesheet.

      3. Use shorthand property
        Wherever possible, try to use shorthand property.

    2. Validate your code
      Use Tools like CSS Optimizer

    3. Compress your CSS
      Have a developer CSS file named app.css and have a folder named production where you will have another app.css

    4. Preload your CSS in browser
      <link rel="preload" href="app.css" as "style">
      The above code will tell the browser to load the file a bit early.

    5. Lighten up the framework
      Ony have files which are required from the framework, remove the rest of all the files.

    6. Learn a Pre-Processor Language

      • It will save coding time.
      • Give flexibilty while styling.
      • Export Highly Optimized images

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published