gausszhou / vue3-drag-resize-rotate

一个Vue3.0组件,支持拖拽,拉伸,旋转,放缩,自动对齐;A Component for Vue.js 3.0;
https://gausszhou.github.io/vue3-drag-resize-rotate/
MIT License
160 stars 27 forks source link

Don't use scoped styles for overrideable styles #36

Closed IlyaSemenov closed 7 months ago

IlyaSemenov commented 7 months ago

Currently, the library publishes styles in @gausszhou/vue3-drag-resize-rotate/lib/bundle.esm.css as .vue-drag-resize-rotate[data-v-3c286975] { ... }

This makes it inconvenient to override (amend) the styles in the project. One either have to copy the scope selector (which is error prone, as the scope ID is auto generated and will change on every package update), or trick CSS to narrow the selector with some sort of hack, for instance :root .vue-drag-resize-rotate { ... }

In my thinking, library solutions should not be using scoped (or module) styles. The library styles are supposed to have a well recognizable place in the global scope, so that user could easily override them without additional hacks.