+ 8
Explanation for polymorphism
3 Respostas
+ 9
I don't think this is a generally accepted term, but it appears to be used a couple of times in the context of properties. Different CSS properties accept different values.
Polymorphism is defined (by Dictionary.com) as:
The occurrence of something in different forms, in particular.
In the case of CSS, individual properties can affect their target in a multitude of ways:
background:#fff; /* The background is white */ background:url(img.png); /* The background is an image */ background:#fff url(img.png); /* The background is white with an image */ background:url(img.png) no-repeat; /* The background is a non-repeating image */ /* Etc... */
This is polymorphism.
Pro HTML5 and CSS Design Patterns describes CSS polymorphism (in relation to properties) as a "combinatorial explosion of possibilities"
↓↓↓ :)
https://stackoverflow.com/questions/16665740/css-polymorphism-used-in-css3
+ 1
insightful thanks!
+ 1
Polymorphism is a OOPs concept where one name can have many forms.
For example, you have a smartphone for communication. The communication mode you choose could be anything. It can be a call, a text message, a picture message, mail, etc. So, the goal is common that is communication, but their approach is different. This is called Polymorphism.