mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Fix for viewport units, remove DataTable max-height (#2247)
* Add viewport units snapshot test * Fix snapshot app * Update snapshots * Update DataTable max-height to 100% * Update CHANGELOG.md * Remove max height from DataTable CSS
This commit is contained in:
File diff suppressed because one or more lines are too long
14
tests/snapshot_tests/snapshot_apps/viewport_units.py
Normal file
14
tests/snapshot_tests/snapshot_apps/viewport_units.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class ViewportUnits(App):
|
||||
CSS = """Static {width: 100vw; height: 100vh; border: solid cyan;} """
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Static("Hello, world!")
|
||||
|
||||
|
||||
app = ViewportUnits()
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
@@ -211,6 +211,11 @@ def test_css_property(file_name, snap_compare):
|
||||
assert snap_compare(path_to_app)
|
||||
|
||||
|
||||
def test_viewport_height_and_width_properties(snap_compare):
|
||||
path_to_app = SNAPSHOT_APPS_DIR / "viewport_units.py"
|
||||
assert snap_compare(path_to_app)
|
||||
|
||||
|
||||
def test_multiple_css(snap_compare):
|
||||
# Interaction between multiple CSS files and app-level/classvar CSS
|
||||
assert snap_compare("snapshot_apps/multiple_css/multiple_css.py")
|
||||
|
||||
Reference in New Issue
Block a user