GithubHelp home page GithubHelp logo

How to customize styles? about erd-editor HOT 10 CLOSED

dineug avatar dineug commented on July 18, 2024
How to customize styles?

from erd-editor.

Comments (10)

dineug avatar dineug commented on July 18, 2024

Documents can be found at: https://github.com/vuerd/vuerd/tree/master/packages/vuerd
Built-in CSS examples https://github.com/vuerd/vuerd/tree/master/packages/vuerd/theme

from erd-editor.

Daybayzayd avatar Daybayzayd commented on July 18, 2024

Is there a way to have different table background ?

For example One table with blue background (in the title for example), another with green background etc. ?

I would like to recognize different type of table directly with the color, like this :
https://drawsql.app/img/drawsql-screenshot-2.png

from erd-editor.

PhucNgo1711 avatar PhucNgo1711 commented on July 18, 2024

Documents can be found at: https://github.com/vuerd/vuerd/tree/master/packages/vuerd
Built-in CSS examples https://github.com/vuerd/vuerd/tree/master/packages/vuerd/theme

Ah thank you

from erd-editor.

dineug avatar dineug commented on July 18, 2024

Is there a way to have different table background ?

For example One table with blue background (in the title for example), another with green background etc. ?

I would like to recognize different type of table directly with the color, like this :
https://drawsql.app/img/drawsql-screenshot-2.png

There is no function at this time.
Function development is simple, so I'll add it.

@Daybayzayd

from erd-editor.

PhucNgo1711 avatar PhucNgo1711 commented on July 18, 2024

@dineug how do I overwrite some custom css?
Right now stuff like this is being ignored

.vuerd-table .vuerd-table-header-top .vuerd-button {
  height: 1em !important;
}

from erd-editor.

dineug avatar dineug commented on July 18, 2024

I don't recommend it because it breaks the size calculation.

Here's how:
https://www.html5rocks.com/ko/tutorials/webcomponents/shadowdom-201/

@PhucNgo1711

from erd-editor.

PhucNgo1711 avatar PhucNgo1711 commented on July 18, 2024

I don't recommend it because it breaks the size calculation.

Here's how:
https://www.html5rocks.com/ko/tutorials/webcomponents/shadowdom-201/

@PhucNgo1711

Got it thanks! I was actually trying something else. The height was just a random example.

from erd-editor.

PhucNgo1711 avatar PhucNgo1711 commented on July 18, 2024

@dineug So I was able to use the shadow DOM styling for something like, as an example, the body tag, but I still can't use it for .vuerd-table-button
https://codesandbox.io/s/vuerd-react-test-uzfld?file=/src/App.js

Did I miss something?

from erd-editor.

dineug avatar dineug commented on July 18, 2024

I've tried a few things.
I don't think it's working.

To add a style to ShadowRoot, you must import ShadowRoot.

const shadowRoot = editor.shadowRoot;
shadowRoot.appendChild(style);

@PhucNgo1711

from erd-editor.

Daybayzayd avatar Daybayzayd commented on July 18, 2024

Is there a way to have different table background ?
For example One table with blue background (in the title for example), another with green background etc. ?
I would like to recognize different type of table directly with the color, like this :
https://drawsql.app/img/drawsql-screenshot-2.png

There is no function at this time.
Function development is simple, so I'll add it.

@Daybayzayd

Thanks for the quick reply and thanks for your great tool ! :)
If the job is just modifying CSS class or dom object, maybe i can do this.

from erd-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.