1
0
mirror of https://github.com/twirl/The-API-Book.git synced 2025-08-10 21:51:42 +02:00

style fix

This commit is contained in:
Sergey Konstantinov
2023-09-25 07:00:47 +03:00
parent 7ecb663613
commit 9e07825489
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ An alternative approach is to expose the possibility of defining rules for how e
api.options.addRule(
'button.checkout.iconUrl',
(data, options) => data.iconUrl
)
);
```
The most coherent implementation of this approach is the CSS technology.[ref CSS](https://www.w3.org/Style/CSS/) We are not actually proposing using a full CSS rule engine in component libraries (because of its overwhelming complexity and excessiveness for most cases), but we are cautiously drawing the reader's attention to the fact that supporting some subset of CSS-like rules could *significantly* simplify the task of customizing UI components.

View File

@@ -70,7 +70,7 @@ if (data.createOrderButtonIconUrl) {
api.options.addRule(
'button.checkout.iconUrl',
(data, options) => data.iconUrl
)
);
```
Наиболее последовательная реализация этого подхода — CSS[ref CSS](https://www.w3.org/Style/CSS/). Мы не то чтобы рекомендуем использовать CSS-подобные правила в библиотеках компонентов (в силу потрясающей сложности их имплементации и, в большинстве случаев, избыточности), но осторожно замечаем, что поддержка какого-то простого подмножества подобного рода правил *значительно* облегчает кастомизацию визуальных компонент для разработчиков.