Developer forum

Forum » Swift » Custom Styling in Swift

Custom Styling in Swift

Gitte Vanroeyen
Reply

Hello everyone, rookie question but I'm trying to figure out what the best practise is for adding custom styling in the Swift theme. 

Right now, we are working with the CSS 'Custom css' in the Swift Tools but I'm not sure if this is the best way of working because the classes that I'm using right now are too general. 

  • Is there a way in Swift to add specific classes to a row, without making 20 'Custom CSS' paragraphs? 
  • How do you manage the custom styling? Is there a better way to manage your CSS, and make it less general? 
  • What is the best practise to add specific CSS-styling?

I would love to learn more. 

 

Thanks! 

 

 

 

Scherm­afbeelding_2023-08-24_om_10.13.20.png

Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Gitte,

 

It really depends on how much control you want to have/give the end user.

 

You can use a custom css file https://doc.dynamicweb.com/swift/customization#14341 and you do have css classes identifying each row type and column/paragraph type (and since themes have their own css class) so you can use it to apply css styles for the entire site.

 

Using the Paragraphs give you (and the backend editor) a granular way to act, so, for example, you can create a "paragraph" that adds a drop shadow, and them you simply apply that to the places where you need it, not to all of the elements of a specific row or paragraph or theme.

 

Hope that helps answer your question.

Nuno Aguiar

Votes for this answer: 1

 

You must be logged in to post in the forum