Skip to content

Avoid PurgeCSS to remove added classes#9

Open
rolojf wants to merge 1 commit into
budparr:masterfrom
rolojf:master
Open

Avoid PurgeCSS to remove added classes#9
rolojf wants to merge 1 commit into
budparr:masterfrom
rolojf:master

Conversation

@rolojf

@rolojf rolojf commented Feb 4, 2020

Copy link
Copy Markdown

Classes and formats defined in stie.css or classes used in the md files

Classes and formats defined in stie.css or classes used in the md files
@rolojf

rolojf commented Feb 4, 2020

Copy link
Copy Markdown
Author

I had to do this to make it work. For your consideration, if it is useful to you. Regards. Thanks for sharing this repo.

@budparr

budparr commented Feb 5, 2020

Copy link
Copy Markdown
Owner

Hey, @rolojf I'm not sure I understand this PR. Are you adding classes to your MD files? Might be an edge case.

@rolojf

rolojf commented Feb 7, 2020

Copy link
Copy Markdown
Author

Well, yes. It is typically what tailwindcss is for. Is it not?

To use the utility classes to modify css during content (html) creation I mean.

I agree that sometimes, classes are going to be stated in templates in the layout folder. But some other times, be used as needed during content creation in md files.

On the other hand, custom base styles will typically be defined with @apply and they are going to be on the site.css file. And it has to be scaned for classes that are used.

At least is what I think.

@olafghanizadeh

Copy link
Copy Markdown
Contributor

If you are using css classes in your md-files it is probably better to implement shortcodes instead. I understand what you are trying to do, but imagine on a big site, it would not be very good to have to search through all the content files on build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants