Reputation: 191
I created a Rotating Images Component with smartedit and now i want to customize the style of that component. There is a field in smartedit style classes, but even though I added a class and in styles.scss
added styles for that class I doesn't work. So i am wondering how can I change styling on a specific component, without changing the styling of all Rotating Images Components.
Upvotes: 0
Views: 1208
Reputation: 366
I will use a concrete example to illustrate how to customize component appearance via css manipulation.
Suppose I would like to change the behavior of "ORDER SUMMARY" in cart view:
find its selector in Chrome dev tools:
cx-order-summary h4
use the following line in file styles.scss, to overwrite the default setting provided by Spartacus styles library:
the final result:
Another example,suppose I need to make font color to be green and font bold:
In order to reduce the workload and avoid repeatedly applying the same CSS settings to the selectors corresponding to the Order Summary and Coupon areas, we can define the repeated CSS settings in %jerry-custom-div (similar to the programming language Macro), and then use @extend in cx-order-summary and cx-cart-coupon to directly reference this common definition.
I use the following code in styles.scss:
final result:
Upvotes: 1