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

use css as styling file #3686

Closed
furesoft opened this issue Mar 21, 2020 · 6 comments
Closed

use css as styling file #3686

furesoft opened this issue Mar 21, 2020 · 6 comments

Comments

@furesoft
Copy link

how can i use css files instead of xaml files?

@wdcossey
Copy link
Contributor

I don't think there will ever be support for loading css file.

I am not sure what you want to accomplish but Avalonia uses XAML markup language.

https://avaloniaui.net/docs/

@danwalmsley
Copy link
Member

Actually at some point there was some project that brought CSS to Avalonia, iv not seen it for a long time though now.

There is currently no plans for Avalonia to change to a different dialect. However if the community wants to build this kind of thing its a great idea.

@sgf
Copy link

sgf commented Dec 10, 2021

https://github.com/warappa/XamlCSS

@sgf
Copy link

sgf commented Dec 10, 2021

I don't think there will ever be support for loading css file.

I am not sure what you want to accomplish but Avalonia uses XAML markup language.

https://avaloniaui.net/docs/

In the design of Style, the design of XAML is very bad. It is highly redundant and difficult to read.

I suggest adding support for CSS-3 directly. Use various advanced improvements made to CSS styles in the web .

@sgf sgf mentioned this issue Dec 10, 2021
@maxkatz6
Copy link
Member

maxkatz6 commented Dec 10, 2021

@sgf from your another comment:

the shorter the better,
the smaller the number of typing characters, the better,
and the smaller space in view of the same function, the better

It needs better reasoning than "smaller == better" and how it will work with bindings, templates and other features that don't exist in CSS. By adding CSS support it might end with the same situation of bloated syntax, but in other way.

Also many CSS features (or even CSS-preprocessor features) can be ported to the Avalonia. Like inner styles. For some of them we already have feature requests, for other you can create new.

@cyraid
Copy link

cyraid commented May 16, 2023

@maxkatz6
It's easier to find employees that have CSS knowledge, and many teams already have people that are comfortable with CSS vs XML (and learning how XAML does it).

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

No branches or pull requests

6 participants