Add a new CSS rule to Chrome Developer Tools, and not through element validation?

I want to add a new style rule directly to the Chrome developer tools, but I'm struggling to do this by following the guide at https://developers.google.com/chrome-developer-tools/docs/elements-styles. #styles_edit

This is the CSS rule that I want to add - I cannot configure the selector by selecting an element, I need to type it directly. I want to do this to make sure the CSS syntax itself is correct.

.y-axis .tick:nth-child(2):nth-last-child(1) text {
  font-weight: bold;
}

I clicked the plus sign to add a rule, but when I did, I found that the developer tools simply wouldn’t allow me to add it by typing or pasting it — it either turns gray or is inserted like this, with incorrect brackets:

enter image description here

, Enter , . .

CSS- , ?

, .

+6
2

, , .

, .tick, . , , , , .

Chrome , , , , , : " ". pseudo , : "" , , , .

, Chrome , .

+4

CSS, Chrome:

" " New style rule, . .

" inspector-stylesheet:1 "" .

0

Source: https://habr.com/ru/post/1525504/


All Articles