-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Checklist
- I have read and accepted the contributing guidelines.
How did you create the site?
Generated from chirpy-starter
Describe the bug
When I use something like {% picture path.jpg class="right w-50" %} the refactoring code lifts the w-50 class to the enclosing , which is as intended. When I introduced some class definitions of my own, which were called w-50vw, they were lifted to the as well.
The code in the refactoring checks only for class names starting with "-w" and then lifts the whole thing. Originally meant for the bootstrap classes w-25, w-50, w-75 and w-100, perhaps they should more specifically check for those, but leave things like w-50vw alone so they will be applied to the img tag.
Furthermore, I defined some more classes, such as w-30, w-35 etc. to expand on the bootstrap set. In this case, of course, I would still want them "lifted" so perhaps the best check would be w-, or just simple document more clearly that any class prefixed with "w-" will be lifted. I could live with either one.
Steps To Reproduce
- Use "{% picture path.jpg class="right w-50" %}" and observe the w-50 class placed on the refactored around the img.
- Use "{% picture path.jpg class="right w_50" %}" and observe the w_50 class placed on the img
- Use "{% picture path.jpg class="right w-50vw" %}" and observe the w-50 class placed on the refactored around the img.
Expected Behavior
Expectation is to either:
- Document any classes with prefix "w-" will get "lifted", and/or
- Only lift classes of the form "w-" and document
This will allow anybody writing their own classes starting with w- not to be bewildered why they don't appear on the img tag.
Environment
Running bundle exec jekyll serve in a docker container
Anything else?
No response