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

Upgrade the package #122

Merged
merged 36 commits into from
Jun 16, 2023
Merged

Upgrade the package #122

merged 36 commits into from
Jun 16, 2023

Conversation

mattesmohr
Copy link
Member

@mattesmohr mattesmohr commented Mar 31, 2023

This merge adds some elements and attributes like for vectors or the shadow DOM. It also revamps the CSS.

Custom properties

Logical properties

I am in favor of the logical properties. I know they are hardly used or supported at the moment. But I think it will be better, when HTMLKit is out of beta. Also someone has to start using them. :-)

Appearance Mode

The appearance of components (light or dark) was previously triggered by the system preference. But sometimes you want to force a specific appearance despite it. By the change from the media query 'prefers-color-scheme' to a simple css class, it can be now forced for the whole webpage.

Body {
   Card {
   }
}
.class("scheme:dark")

But also you can force it for an single component.

Card {
}
.colorScheme(.dark)

Minification

As the code and the complexity for the CSS and JS grows, I thought its time to write a minifier to reduce the size of the file on deployment. At the moment the minifier just removes whitespaces and comments.

It's better to use logical properties for control the layout. Also, a different color scheme depending on the users default appearance.
@mattesmohr mattesmohr closed this Jun 16, 2023
@mattesmohr mattesmohr reopened this Jun 16, 2023
@mattesmohr mattesmohr merged commit e919e51 into main Jun 16, 2023
@mattesmohr mattesmohr deleted the upgrade/htmlkit-3.0-4 branch June 16, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant