CODE STYLE IN CSS3

What is code style mean.?🤷‍♀

Code style mean write, proper readable, extensible code, and follow the standerd rules given by the company or creator, in programming we should follow the rules which makes programming perfect for ourself. but the reason of our lack of knowladge, we avoid these rules and become bad programmer.

What are Standerd Rules.🙄

I will demonstrate you step by step, how to write perfect CSS code.

STEP 1:

Give proper name to identifires. Don’t use a cipher or name the class for the style. Try to come up with a name that explain the purpose of the class.

STEP 2:

Make the class name short as possible, but still easy to understand.
Try to explain what exactly this element is going to do.
This way of doing code make your code readable and efficient.

STEP 3:

Except when its unavoidable, don’t use element name with class name of identifires.

STEP 4:

Measuring units:
Dont define measuring units with zero value, if there is no good reason.

STEP 5:

Frections:
Dont use frection from -1 to 1 with zero.

STEP 6:

Quotes:
If the URL contains, spection char like pranthisis single quote double quote, white space, so then we should need to use quotes, other than no other need to use quotes.

STEP 7:

Separators:

Most importent don’t use anything dashed — as seprator in class names.

STEP 8:

Indents:

As in HTML, always use two space indentation for child element.

STEP 9:

Ordering:

Decelare properties in alphabetical order.

STEP 10:

Selectors:

Always use new line for selector or decleration.

STEP 11:

Blank lines:

This is an obvious yet very important rule: always leave a blank line between the rules.

Summary

Code style in any programming language is very importent, obvious yet there are syntext rules to write code, but its not enough to make better readable code, there for there are some tips to follow and become master to writing code. “If your code understand by others its mean you are better programmer”.

--

--

--

Hy, i'm ReactJS Front End Developer And CYBER SECURITY Export. i love Computer Science!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Want to get into Web application Pentesting in a black-box style?

OnDemandKorea ⋆ 03 Months Warranty

Proven Methods to Pass the PSM

Scrum PSM I Test Assessment Professional Scrum Master Agile

Pragmatic Designs: Argument Passing in Airflow’s Operator Inheritance

What Rancher Server does and how it works? — Series II

Bluehost is a very large Hosting company.

Speedy JSON Endpoints with Rails

Java Program to Implement Control Table

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Toseef Ahmad

Toseef Ahmad

Hy, i'm ReactJS Front End Developer And CYBER SECURITY Export. i love Computer Science!

More from Medium

No more Switch / Cases (Or, most part of them)

QuantumAlert - A Javascript Alert Library 💙

https://quantumalert.cosmogic.com/

Why I am literally in one step from hating SASS?

Optimise your time by creating your own snippets in VS Code