L3010
New Member
Posts: 49
inherit
264353
0
Mar 4, 2023 7:57:32 GMT -8
L3010
49
May 2021
l3010
|
Post by L3010 on Jun 15, 2021 9:53:31 GMT -8
Sometime ago i was asking a member of the PB support forum of how to change the background color of individual categories. I was given code that looks like this:
a[name="category-5"] + .container.boards .content { background: #223452; } When targeting "Category-5 > container > boards > content" the CSS code is using "a[]" to target the certain category.
I have some questions about this code: • Is the "a[]" a part of some (i don't know the word, plugin, library, mod?) like jQuerry? • Is the "a[]" a part of the same as "$[]", the PB-variables?
• Where can i learn more about "a[]"?
• Is there more prefixes to a square bracket like "a[]" and "$[]" that does something in PB-stylesheets?
I'm asking this question because i want to understand more about modding PB-stylesheets and making plugins.
Thanks Leo
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,017
January 2018
retread
|
Post by Retread on Jun 15, 2021 10:27:28 GMT -8
a[name="category-5"] + .container.boards .content { background: #223452; } Hi L3010 Although the punctuation [] is the same as the template variables you previously asked about, the meaning here is quite different. What's shown above is CSS. The first part of the selector: a[name="category-5"] refers to an HTML a element which has a name attribute, with the value "category-5"You can learn more about attribute selectors here: www.w3schools.com/cssref/sel_attribute_value.asp
The + is a combinator. You can learn more about combinators here: www.w3schools.com/css/css_combinators.asp
|
|