SSENSE/vue-carousel

When using inside a we component, styles are not not being applied

Open

#290 建立於 2018年9月24日

在 GitHub 查看
 (5 留言) (2 反應) (0 負責人)JavaScript (1,705 star) (513 fork)batch import
bugenhancementhelp wanted

描述

Bug Report

Current Behavior I am using the great carousel in my VUE CLI project and it works fine. But when I export the project to a web component through the VUE CLI build service, then the carousel styles are outside of the web component and therefore not reachable. (see screenshots below)

Input Code and steps to reproduce

  • create VUE CLI project
  • install Vue Carousel
  • export project as web component
  • check the demo.html in the dist folder

Expected behavior/code This is where I am not sure. I would love to see the styles inside the web component but I am not sure if this is possible.

Babel Configuration (.babelrc, package.json, cli command)

babel.config.js

module.exports = {
  presets: [
    '@vue/app'
  ]
}

package.json

{
    "name": "chatbot-widget",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "serve": "vue-cli-service serve",
        "build": "vue-cli-service build",
        "lint": "vue-cli-service lint",
        "tailwind": "tailwind build ./src/assets/css/tailwind.css -c ./tailwind.js -o ./src/assets/css/output.css"
    },
    "dependencies": {
        "axios": "^0.18.0",
        "postcss-import": "^12.0.0",
        "vue": "^2.5.17",
        "vue-carousel": "^0.13.1",
        "vue-scrollto": "^2.13.0",
        "vue2-animate": "^2.1.0"
    },
    "devDependencies": {
        "@vue/cli-plugin-babel": "^3.0.1",
        "@vue/cli-plugin-eslint": "^3.0.1",
        "@vue/cli-service": "^3.0.1",
        "tailwindcss": "^0.6.5",
        "vue-template-compiler": "^2.5.17"
    },
    "eslintConfig": {
        "root": true,
        "env": {
            "node": true
        },
        "extends": [
            "plugin:vue/essential",
            "eslint:recommended"
        ],
        "rules": {
            "no-console": 0
        },
        "parserOptions": {
            "parser": "babel-eslint"
        }
    },
    "browserslist": [
        "> 1%",
        "last 2 versions",
        "not ie <= 8"
    ]
}

Environment

  • Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34]
  • Node/npm version: Node v10.7.0/npm 6.4.1
  • OS: macOS 10.13.6

Possible Solution

Additional context/Screenshots

Styles are outside of web component (Styles are outside of the web component)

Styles are not applied (Styles for eg. VueCarousel-inner are not applied)

貢獻者指南

When using inside a we component, styles are not not being applied · SSENSE/vue-carousel#290 | Good First Issue