Editing default elements with Custom CSS
How to edit default elements' settyings with custom CSS in Setka
Last updated
How to edit default elements' settyings with custom CSS in Setka
Last updated
Some types of design cannot be achieved with standard Content Design System Manager (CDSM) tools. In such cases, you can customize dividers, tables, lists, or galleries using Custom CSS.
Suppose you want to add a dashed divider into your Setka Editor style. All dividers are solid by default, but CSS can make them dashed and add many other parameters.
Consider the editing process in this example.
Before editing the divider, we will need to find out its' class. Let's do this with the browser's built-in developer tools:
Go to Content Design System Manager (CDSM): open Setka Account and select Styles on the top bar.
Select divider in the list of elements on the left. It will be automatically shown in the preview zone — on the right.
Open developer tools (⌘+⌥+I, CTRL+SHIFT+I, or F12).
Switch to element selection mode and click on the divider in the preview zone.
Divider code will be shown on the Elements panel:
hr
— element type — horizontal row;
quoted value — element class stk-theme_30028__separator_basic_divider
, where 30028
is the style ID number.
Copy the divider class to use it in step 2.
Galleries and lists are not edited in the Content Design System Manager (CDSM). If an element is not available in CDSM, additional actions will be required:
Create a new post in Setka Editor.
Add the element that you are going to edit into the post.
Open preview by clicking on the corresponding button on the right bar or pressing TAB.
Open developer tools (⌘+⌥+I, CTRL+SHIFT+I, or F12).
Switch to element selection mode and click on an element you want to edit on the preview zone.
Element code will be shown on the Elements panel:
hr
— element type — horizontal row;
quoted value — element class stk-theme_30028__separator_basic_divider
, where 30028
is the style ID number.
Copy the element class and proceed to step 2.
Please note: some elements in Setka consist of several parts. For instance, every gallery button has its own class: slick-prev
for the left arrow andslick-next
— for the right arrow.
Now selected classes can be modified with any CSS methods. To add the dashed
property to the divider:
Go back to Content Design System Manager: open Setka Account, select Styles on the top bar, then, the style, element of which you wanted to modify.
Scroll the elements list down to the end and click on Custom CSS.
3. Add a new row. Start it with the dot, then paste the divider class obtained in Step 1:
List any CSS parameters in braces. To make the divider "dashed," add the border
property and set its' value to dashed
. Set the distance between dashes — 3 pixels, by adding 3px
:
Save changes in the Custom CSS and the style.
We recommend checking the Apply the styles to post content only box. If it is active, CSS changes will only affect the content created in Setka Editor, using this style, without affecting other elements of your site.
Please note: you will see the changes from Custom CSS only in the editor and posts. They won't be seen in the CDSM's preview zone.