-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
Open the provided Play VueJS link
What is expected?
Neither of the lines to have red background
What is actually happening?
VueJS is able to override existing styles of the HTML before setup
but not able to remove existing classes via :class
System Info
Reproduces consistently in different browsers
Any additional comments?
I can guess this can be the current intended behavior if not overlooked and that's understandable to me, my usecase however was to "hydrate" an existing HTML (it's a simple build-less app and doesn't use Vue's SSR) so I have used couple of style="display: none" :style="{ display: undefined }"
to display some of the elements only after VueJS' load, but couldn't remove existing classes via class="preload" :class="{ preload: undefined }"
or override data data-mode="0" :data-mode="1"
and I think making them to act consistent like style overrides is also less surprising for the user. I already have a more of less ugly workaround for it but thought something might be possible from the Vue's side.