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

border-radius is not working. #3844

Open
Krepppa352 opened this issue Dec 22, 2024 · 3 comments
Open

border-radius is not working. #3844

Krepppa352 opened this issue Dec 22, 2024 · 3 comments
Labels

Comments

@Krepppa352
Copy link

Krepppa352 commented Dec 22, 2024

In my style.css, I have this for a custom hardware info element:

#custom-hardware {
    border-style: solid;
    border-width: 2px;
    border-image: linear-gradient(to bottom right, rgba(51, 204, 255, 238), rgba(00, 255, 153, 238)) 1;
    border-radius: 12px;
}

Though the border-radius property has no effect.

I am on CachyOS (arch based) and using Hyprland for the Desktop Environment. If you need any additional info, let me know!

@msmafra
Copy link

msmafra commented Dec 23, 2024

I can confirm that it does round the edges. In my main configuration I use border-radius and works fine, adding border-image with linear gradient breaks it. But, testing it on W3C Schools site it seems that CSS itself doesn't accept rounding for the border images.
https://www.w3schools.com/cssref/tryit.php?filename=trycss3_border-image

#custom-hardware {
    border: 0.5rem solid transparent;
    border-image: linear-gradient(to bottom right, rgba(51, 204, 255, 238), rgba(00, 255, 153, 238)) 10%;
    border-radius: 20px;
}

@Krepppa352
Copy link
Author

@msmafra yeah, apparently border-image overrides/ignores border-radius. So for now, I just won't use border gradients. There seem to be workarounds, but right now I'm too lazy to figure them out.

@msmafra
Copy link

msmafra commented Dec 24, 2024

@Krepppa352 Maybe using background gradients, really not sure if it's possible, one element with the grandient and its label with a solid color, applying padding and/or margin too to simulate a border.

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