Vue Custom Element

This demo web page illustrates a few things:

As you can see the HTML H2 heading elements are used both on this web page AND inside the two Vue Web Components below. The HTML H2 elements inside the Vue Web Component don't share / "receive" any styling from the used external CSS file.

Except for the CSS Custom Property that gives it color.

h2. Change color

The button below uses JavaScript to change the value of the CSS color Custom Property set in the external CSS file.

Inside the Vue Web Components below the CSS Custom Property (from the external CSS file) also colors the H2 headings.

Slot data: some USP's below
  • Using named slot data
  • We are so awesome
  • Are they all the same?
Default slot data