I am attempting to phrase my question differently:
As mentioned in a book: "multiple classes:
p.testorosso.grassetto {color: red; font-weight: bold;}
This rule will apply the specified styles to all elements that contain the names of the defined classes in any order. Therefore, paragraphs with both classes will have red text and be bolded, like so:
<p class="grassetto testorosso maiuscolo">..</p>
<p class="testorosso grassetto">...</p>
However, elements with only one of the assigned class names will not be affected:
<p class="grassetto">...</p> "
Does this rule hold true?
I plan to write a program that will search for the corresponding CSS class definitions based on the HTML structure. In the example provided, when encountering this line in the HTML:
<p class="grassetto testorosso maiuscolo">..</p>
In the CSS file or definition, I believe I need to try different combinations:
- Attempt 1: Search for ".testorosso.grassetto.maiuscolo" OR ".testorosso .grassetto .maiuscolo"? --> Not found
- Attempt 2: ".grassetto.maiuscolo" --> Not found
- Attempt 3: ".testorosso.maiuscolo" --> Not found
- Attempt 4: ".testorosso.grassetto" --> Found
- Attempt 5: ".maiuscolo" --> Found
Is this correct? Or is there a simpler way to locate the CSS definition?
If during attempt 5, I come across two definitions for "maiuscolo" like these:
1) .pluto .maiuscolo {font-size: x-large}
2) .topolino .maiuscolo {font-size: xx-large}
How should I proceed? Should I go with number 1 or 2?
I apologize if I have not used the appropriate terminology to explain my issue, as I am new to the world of CSS,
Thank you all