Skip to content

Commit 629ffb5

Browse files
authored
Merge pull request #5890 from edward-jazzhands/fix_css_transparency
Fixed CSS transparency bug in _style_properties.py
2 parents 0490a4d + 58f576c commit 629ffb5

File tree

4 files changed

+210
-1
lines changed

4 files changed

+210
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
### Fixed
11+
12+
- Fixed issue with the "transparent" CSS value not being transparent when set using python
13+
814
## [3.5.0] - 2025-06-20
915

1016
### Changed

src/textual/css/_style_properties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def __set__(self, obj: StylesBase, color: Color | str | None) -> None:
991991
self.name, context="inline", error=error, value=token
992992
),
993993
)
994-
parsed_color = parsed_color.with_alpha(alpha)
994+
parsed_color = parsed_color.multiply_alpha(alpha)
995995

996996
if obj.set_rule(self.name, parsed_color):
997997
obj.refresh(children=True)

0 commit comments

Comments
 (0)