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

[feat] Allow override.styl for all themes, not just the default #404

Closed
ghys opened this issue May 10, 2018 · 1 comment
Closed

[feat] Allow override.styl for all themes, not just the default #404

ghys opened this issue May 10, 2018 · 1 comment

Comments

@ghys
Copy link
Contributor

ghys commented May 10, 2018

Following the discussion in #339 (comment):

I would simply like to suggest removing the options.useDefaultTheme check here:

const hasUserOverride = options.useDefaultTheme && fs.existsSync(overridePath)

The benefit would be to still be able to change Stylus variables like $accentColor when making small modifications to the default theme, for example adding a component to a slot of the default Layout:

<template>
  <Layout>
    <PageFooter slot="page-bottom" />
  </Layout>
</template>

<script>
import Layout from '@default-theme/Layout.vue'
import PageFooter from 'PageFooter.vue'

export default {
  components: {
    Layout,
    PageFooter
  }
}
</script>

Other custom themes could also allow local overrides by having @import '~@temp/override.styl' in their style. If not the file would still be copied in app/.temp but won't have any effect.

@lunaceee
Copy link

I added a Layout.vue component with the code example here to theme/Layout footer and getting the [Vue warn]: Unknown custom element: <Layout> - did you register the component correctly? For recursive components, make sure to provide the "name" option. error. Any suggestions? Thanks!

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

3 participants