NicoNekoru / obsidan-advanced-table-xt

Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
Apache License 2.0
95 stars 4 forks source link

CCS Style Sheets added to doc not working correctly. #31

Closed HippyCraig closed 1 year ago

HippyCraig commented 1 year ago

I have a style sheet setup in obsidian snippets

.ccg-work-table-top-rounded-install-doc {
        ......... Lots of other styles removed for clarity
    & .instruction-separator {
        background-color: rgb(110, 110, 110) !important;
    }
}

Inside the table in the MD view I have this:

| Patch installs ~ .instruction-separator | <                               |

Looking at the rendered HTML in Chrome it appears to keep the . in the name of the class when it shouldnt be there.

<td class=".instruction-separator" row-index="3" col-index="0" colspan="2" style="text-align: left;"><p> Patch installs </p></td>

This doesnt work but if I mod the value in chrome directly like:

<td class="instruction-separator" row-index="3" col-index="0" colspan="2" style="text-align: left;"><p> Patch installs </p></td>

The class name is evaluated correctly and creates the desired effect. Is there something I need to change in my MD to make this work correctly?

NicoNekoru commented 1 year ago

Ah yeah this was intended when I initially made the function since the "classes" were not actually creating a stylesheet, but instead mapping the styles from an object. I didn't realize that this functionality could be useful and the fix should be pretty simple.

NicoNekoru commented 1 year ago

Fix landed in 1.2.4

HippyCraig commented 1 year ago

This is great thanks so much works great. Thanks for fixing this so quickly.