Is SASS/SCSS a way to make OOCSS?

297 Views Asked by At

i know SASS/SCSS and I know whats object oriented, but can I say that SASS is a way to make CSS object oriented? Please correct me if I am wrong.

2

There are 2 best solutions below

0
shaune On BEST ANSWER

It's an interesting question as SASS/SCSS doesn't exactly determine the ability to make CSS object oriented. The CSS you write will. As you know it is simply a layer to pre compile CSS.

You could definitely and rightly so state that by using SASS it makes it easier to create object oriented-like css. It definitely helps as you can individualise classes into files, extend, include etc. and you can import them which helps in creating a closer to modular environment than regular CSS provides.

As SASS compiles to CSS, you really could achieve the same Object Oriented classes without it. But it may help you organise the objects.

0
Donald Wu On

I think it is not really object oriented, but you can use some functions like other progrmamming languages.

  • variable
  • nesting
  • mixin (function)
  • opearators (+ - * /)

These help you easier to reuse and maintain css code