vue-window icon indicating copy to clipboard operation
vue-window copied to clipboard

Some styling cannot be over-ridden with StyleFactory

Open hybridwebdev opened this issue 6 years ago • 2 comments

So as the title indicates, if you use the StyleFactory like so:

import * as VueWindow from '@hscmap/vue-window'
Vue.use(VueWindow)
Vue.component('hsc-window-style-pockets', VueWindow.StyleFactory( { 
    title: {
        display: "none"
    },
    titlebar: {
        display:"none"
    },
} ) )

This works for the most part, and is great as it means not having to declare separate styling with a stylesheet. However, some aspects cannot be overridden. Specifically, the content element does not allow you to override the padding as you have it hard coded. You can still get around this by doing:

.parent-class .content {
   padding:0px !important;
}

However this is clearly undesirable and somewhat defeats the purpose of having the style factory in the first place.

hybridwebdev avatar Jan 26 '19 02:01 hybridwebdev

+1 on this.

@hybridwebdev How did you end up working around it?

I could try to fix but I am not sure @michitaro is still active on this project, I see an unresolved PR from July 2018.

anpel avatar Jun 05 '20 11:06 anpel

Looks like you can override padding directly with props, for example:

<hsc-window padding="30" ...>

Not ideal, but at least you don't have to adjust the padding of every inner element to get the padding you need.

anpel avatar Jun 05 '20 13:06 anpel