SOLVED

"my tokens" ignores my css?

Go to solution
Anonymous
Not applicable

"my tokens" ignores my css?

Hi,

So, I recently started using custom tokens and stumbled upon an issue.. The tokens completely ignores my css resulting in a broken responsive design.. only the text tokens I may add.

Today I am creating text / rich text tokens and puts them into a table in a snippet that is imported to my mail template, and thats were the tokens ignores my css for the table and e-mail template.

Anyone who have mastered this one?

Is it because I am not embedding the token with a own class in css?

// jonas

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: "my tokens" ignores my css?

Tokens can't ignore CSS. If the final output is proper (email-proper, which of course is a subset of browser-proper) HTML, then styles will be applied.  I'd assume the final output is actually broken (for example, you have an extra closing tag because it exists in both the token and the static part of the layout). Post examples of the tokenized template and the final output and I'm sure we can figure it out.

View solution in original post

8 REPLIES 8
Ayan_Talukder
Level 5

Re: "my tokens" ignores my css?

Hey Jonas, post your code. Lets take a look.

Anonymous
Not applicable

Re: "my tokens" ignores my css?

Hi,

away from work atm but will post asap.. Although it works fine using snippets its when inserting tokens the css cracks. Instead of breaking up the text in the tokens it just keeps the line of text asis.

Josh_Hill13
Level 10 - Champion Alumni

Re: "my tokens" ignores my css?

huh. my understanding is that the text token would take on the attributes given to it in the Asset.

Did you find anything in the forums?

Anonymous
Not applicable

Re: "my tokens" ignores my css?

yeah, that was my thought as well. as mentioned above there is no problem with the responsibility until I insert the tokens.. I can also add that I am using a token to insert a image, and that works like a charm!

Ayan_Talukder
Level 5

Re: "my tokens" ignores my css?

Hmm we use tokens in our CSS to change the colour of certain aspects of the email such as the header text and footer. What aspects of the CSS are you trying to tokenize?

Anonymous
Not applicable

Re: "my tokens" ignores my css?

I'm not trying to tokenise the code, I simply which my token to obey my code

am doing a template for others to use that needs to be as simple as possible.

SanfordWhiteman
Level 10 - Community Moderator

Re: "my tokens" ignores my css?

Tokens can't ignore CSS. If the final output is proper (email-proper, which of course is a subset of browser-proper) HTML, then styles will be applied.  I'd assume the final output is actually broken (for example, you have an extra closing tag because it exists in both the token and the static part of the layout). Post examples of the tokenized template and the final output and I'm sure we can figure it out.

Anonymous
Not applicable

Re: "my tokens" ignores my css?

there we have it! the token inserted an extra <span> tag which turned out to be the root cause to my trouble.. thank you all for your replies!