Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components that inherit from another class do not render with the appropriate CSS class #854

Open
kino-pi opened this issue Jul 23, 2023 · 1 comment
Labels

Comments

@kino-pi
Copy link

kino-pi commented Jul 23, 2023

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.

screen01

Actual behavior: Components are not being styled.

screen

classes

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 -- --web results in the expected behavior.
  • Defining a class on <self> like <self.anything> on each component results in the expected behavior.

Reproduction

https://github.com/kino-pi/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.229
@kino-pi kino-pi added the bug label Jul 23, 2023
@haikyuu
Copy link
Collaborator

haikyuu commented Jul 24, 2023

Working reproduction in stackblitz here https://stackblitz.com/edit/github-dcnwj2?file=src%2Fmain.imba

Thanks @kino-pi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants