Coder Social home page Coder Social logo
List of notes regarding structuring and maintaining a website
in particular for best practices.

##########################################################
Structuring CSS:
##########################################################
Personal preference: 
    - Give link in comments when a link was particularly 
      useful, my way of giving credit through referencing.

One or more files:
    - A single CSS file is in principle faster with
      fewer files to load and fewer http-requests
  
    - If it becomes too big, then you could think of
      making it modular and using code/software to bundle it

    Although in earlier versions I used a CSS per theme/bundle 
    of I noticed it quickly resulted in duplicate code. Hence, 
    for now I start with a single CSS file for the entire website.
    In future if it becomes too big, make an essential CSS on first
    load and other CSS for later loads.

    See also:
    https://www.reddit.com/r/css/comments/pllihb/one_css_file_or_multiple/
    https://www.quora.com/It-s-better-practice-to-have-a-big-CSS-file-or-many-smaller-ones-Why

Coding styles
    - argument and value on different lines
    - two space indentation
    - comment enough with /* method */
    - hyphenation to connect words
    - try to not be over specific with names of properties and selectors
    - Important to learn, the combination of selectors and hyphenation.
      Using this reduces duplicate code and allows fine tuning from template
      See DRY method in 
      https://www.freecodecamp.org/news/7-important-tips-for-writing-better-css/
    
      
      
    See also:
    https://docs.ckan.org/en/2.9/contributing/css.html
    https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#selectors

cneijssel's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.