File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -870,22 +870,35 @@ <h3 id="css-repeated-properties">Повторяющиеся свойства</h3
870
870
< article class ="chapter-part ">
871
871
< div class ="chapter-part-col ">
872
872
< h3 id ="css-units "> Единицы измерения</ h3 >
873
- < p > Единицы измерения не указаны там, где в них нет необходимости.</ p >
873
+ < ul >
874
+ < li > Единицы измерения не указаны там, где в них нет необходимости.</ li >
875
+ < li > В кастомных свойствах нужно указывать единицу измерения.</ li >
876
+ </ ul >
874
877
</ div >
875
878
< div class ="chapter-part-col gray-bgcolor ">
876
879
< figure >
877
880
< pre > < code class ="language-css "> /* Хорошо */
881
+ :root {
882
+ --size: 0px;
883
+ }
884
+
878
885
.element {
879
886
border: 0;
880
887
box-shadow: 0 1px 2px #cccccc, inset 0 1px 0 #ffffff;
881
888
margin-top: 0;
889
+ width: calc(100% - var(--size));
882
890
}
883
891
884
892
/* Плохо */
893
+ :root {
894
+ --size: 0;
895
+ }
896
+
885
897
.element {
886
898
border: 0px;
887
899
box-shadow: 0px 1px 2px #cccccc, inset 0px 1px 0 #ffffff;
888
900
margin-top: 0px;
901
+ width: calc(100% - var(--size));
889
902
}
890
903
891
904
</ code > </ pre >
You can’t perform that action at this time.
0 commit comments