deathau / cm-show-whitespace-obsidian

A plugin for [Obsidian](https://obsidian.md) which shows whitespace in the editor.
53 stars 6 forks source link

Bug -- Weird behavior with check box CSS #2

Open tallguyjenks opened 3 years ago

tallguyjenks commented 3 years ago

Hey!

So i normally use this for my check box CSS:

/* ...... 2.7.1 Nicer Round Checkboxes -- https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/34 */
input[type="checkbox"],
.cm-formatting-task {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  border: 1px solid var(--text-faint);
  padding: 0;
  vertical-align: top;
}
.cm-s-obsidian span.cm-formatting-task {
  color: transparent;
  width: 1.25em !important;
  height: 1.25em;
  display: inline-block;
}
input[type="checkbox"]:focus {
  outline: 0;
}
input[type="checkbox"]:checked,
.cm-formatting-task.cm-property {
  background-color: var(--text-accent-hover);
  border: 1px solid var(--text-accent-hover);
  background-position: center;
  background-size: 70%;
  background-repeat: no-repeat;
  background-image: url('data:image/svg+xml; utf8, <svg width="12px" height="10px" viewBox="0 0 12 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-4.000000, -6.000000)" fill="%23ffffff"><path d="M8.1043257,14.0367999 L4.52468714,10.5420499 C4.32525014,10.3497722 4.32525014,10.0368095 4.52468714,9.8424863 L5.24777413,9.1439454 C5.44721114,8.95166768 5.77142411,8.95166768 5.97086112,9.1439454 L8.46638057,11.5903727 L14.0291389,6.1442083 C14.2285759,5.95193057 14.5527889,5.95193057 14.7522259,6.1442083 L15.4753129,6.84377194 C15.6747499,7.03604967 15.6747499,7.35003511 15.4753129,7.54129009 L8.82741268,14.0367999 C8.62797568,14.2290777 8.3037627,14.2290777 8.1043257,14.0367999"></path></g></g></svg>');
}

and normal appearance in edit/preview is thus:

image image

When i have the whitespace plugin installed (not even active) this is what displays in edit mode only, preview mode is normal:

image

image


uninstalled the plugin and reinstalled, same issue. using latest versions of plugin and obsidian and no errors appear in the developer console

deathau commented 3 years ago

I haven't done anything to fix this issue as such, but the latest release should make it so it doesn't interfere when the plugin is off. (I mean it shouldn't do anything when the plugin is off anyway, but...) Can you check this out for me and make sure?

Still keeping this issue open for now so I can remember to later check on what's up with these checkboxes specifically.

tallguyjenks commented 3 years ago

@deathau when turned off i no longer causes an issue :)

tallguyjenks commented 3 years ago

turned the plugin on again and for some reason issues is fixed? not sure what you did if anything but everything works just fine now 😃

image

tallguyjenks commented 3 years ago

The behavior reappeared with latest release and everything i have is up to date, no changes that could have caused this besides the plugin :/

deathau commented 3 years ago

Well I never did anything specific to fix it, so I guess it makes sense that this reappeared 😆

Out of curiosity, if you toggle the plugin off and on again, does it get better?

tallguyjenks commented 3 years ago

weird, i wonder why it was working fine for some reason... i updated the plugin and then the weird behavior returned o_O

toggling the plugin does nothing, and i even removed the plugin and the behavior remains until i restart