Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using classes in [row] and [col] shortcodes makes shortcode magic not work #71

Open
lmanes opened this issue Oct 3, 2023 · 1 comment
Labels
backlog Added to backlog

Comments

@lmanes
Copy link

lmanes commented Oct 3, 2023

I'd like to use some existing Bootstrap classes in a grid I'm creating via shortcode.

But this:

[row class="border border-dark bg-light]

renders as

<div class="grid border border-dark bg-light">

and not as

<div class="grid row border border-dark bg-light">

as I expected.

It seems that adding any other classes within the [row] shortcode results in the shortcode magic not working. The same thing happens with [col class="col-sm border"].

Is it possible to append my classes rather than replacing the row and col classes when the shortcode does its thing?

I can get around this by just manually adding row and col classes, of course, but I'm supporting/trying to hand management off to other folks who are pretty unfamiliar with HTML and CSS and are therefore more reliant on shortcodes.

@lcaple lcaple added feature request New feature or enhancement backlog Added to backlog and removed feature request New feature or enhancement labels Nov 7, 2023
@lcaple
Copy link
Contributor

lcaple commented Nov 7, 2023

[row] was written intended to be used without additional CSS. We can look into keeping this in place on the shortcode.

That said, I recommend repeating the class if you're going to use more classes on [row].

For [col], the col class is redundant if you're declaring col-sm or any other size, which is why the shortcode automatically clears classes. We'll keep [col] as-is to avoid conflicting CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Added to backlog
Projects
None yet
Development

No branches or pull requests

2 participants