Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some styling cannot be over-ridden with StyleFactory #18

Open
hybridwebdev opened this issue Jan 26, 2019 · 2 comments
Open

Some styling cannot be over-ridden with StyleFactory #18

hybridwebdev opened this issue Jan 26, 2019 · 2 comments

Comments

@hybridwebdev
Copy link

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.

@anpel
Copy link

anpel commented Jun 5, 2020

+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
Copy link

anpel commented Jun 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants