Components that inherit from another class do not render with the appropriate CSS class
Author: ghostCreated Jul 23, 2023Updated Nov 23, 2024
Labelsbug
Description
I have defined a few components like so:
tag my-component
css w:fit-content h:fit-content
bg:cool9 c:cool1
p:1rem 2rem
<self>
<slot>
tag my-button < button
css w:fit-content h:fit-content
bg:cool9 c:cool1
p:1rem 2rem
<self>
<slot>
tag my-div < div
css w:fit-content h:fit-content
bg:cool9 c:cool1
p:1rem 2rem
<self>
<slot>Expected behavior: Components that extend another class should render with the defined CSS styles.
Actual behavior: Components are not being styled.
Firefox inspector showing the lack of compiled CSS classes on both the button and div components
Other notes:
- Running the project with the --web command line flag
npm run dev -- --webresults in the expected behavior. - Defining a class on
<self>like<self.anything>on each component results in the expected behavior.
Reproduction
https://github.com/[redacted]/imba-project
To reproduce clone the repository, cd imba-project/ and run npm install && npm run dev
System Environment
System:
OS: Linux 6.4 Arch Linux
CPU: (4) x64 Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz
Memory: 4.34 GB / 7.44 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.4.0 - /usr/bin/node
npm: 9.8.1 - /usr/bin/npm
Browsers:
Chromium: 115.0.5790.102
npmGlobalPackages:
imba: 2.0.0-alpha.229Source: imba/imba