1.How to name Css classes properly?
Well there are many ways to name classes properly:
✧ Use content to find a name.
✧ Put the class name at the lowest possible level.
✧ Don’t use camelCase.
But here we are going to discuss about an easy way which is by using a 𝗡𝗮𝗺𝗶𝗻𝗴 𝗖𝗼𝗻𝘃𝗲𝗻𝘁𝗶𝗼𝗻.
2. What is a 𝗡𝗮𝗺𝗶𝗻𝗴 𝗖𝗼𝗻𝘃𝗲𝗻𝘁𝗶𝗼𝗻?
A naming convention is a convention for naming things.
we are will see a list of work what is 𝗕𝗘𝗠.
What is BEM naming convention? → BEM Stands for Block, element & modifier. → What are they? Let see here.
What is block?
→ A block is an element that is meaningful on its own.
What is Element?
→ Elements are always parts of a block & have no standalone meaning.
What is Modifier?
→ Think of the modifier as a flag used to change the apperance, behaviour or state.