diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa06b03c0..89140e36d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Rebuilt `DirectoryTree` with new `Tree` control.
+- The default `width` of a `Label` is now `auto`.
### Fixed
diff --git a/src/textual/widgets/_label.py b/src/textual/widgets/_label.py
index df519ae4f..344c37013 100644
--- a/src/textual/widgets/_label.py
+++ b/src/textual/widgets/_label.py
@@ -5,3 +5,11 @@ from ._static import Static
class Label(Static):
"""A simple label widget for displaying text-oriented renderables."""
+
+ DEFAULT_CSS = """
+ Label {
+ width: auto;
+ height: auto;
+ }
+ """
+ """str: The default styling of a `Label`."""
diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
index a92a00f7a..c2ae2ab5f 100644
--- a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
+++ b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
@@ -6660,137 +6660,136 @@
font-weight: 700;
}
- .terminal-2104815115-matrix {
+ .terminal-404849936-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-2104815115-title {
+ .terminal-404849936-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-2104815115-r1 { fill: #ffff00 }
- .terminal-2104815115-r2 { fill: #c5c8c6 }
- .terminal-2104815115-r3 { fill: #e8e7e5 }
- .terminal-2104815115-r4 { fill: #e1e1e1 }
- .terminal-2104815115-r5 { fill: #14191f }
- .terminal-2104815115-r6 { fill: #dde8f3;font-weight: bold }
- .terminal-2104815115-r7 { fill: #ddedf9 }
+ .terminal-404849936-r1 { fill: #ffff00 }
+ .terminal-404849936-r2 { fill: #c5c8c6 }
+ .terminal-404849936-r3 { fill: #e8e7e5 }
+ .terminal-404849936-r4 { fill: #e1e1e1 }
+ .terminal-404849936-r5 { fill: #dde8f3;font-weight: bold }
+ .terminal-404849936-r6 { fill: #ddedf9 }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- Layers
+ Layers
-
-
-
- ┌────────────────────────────────────────┐
- ││ull of stars! My God! It's full of
- ││ It's full of stars! My God! It's
- │This should float over the top│ My God! It's full of stars! My God!
- ││tars! My God! It's full of stars! My
- ││ of stars! My God! It's full of ▄▄
- └────────────────────────────────────────┘ It's full of stars! My God! It's
- full of stars! My God! It's full of stars! My God! It's full of stars! My God!
- It's full of stars! My God! It's full of stars! My God! It's full of stars! My
- God! It's full of stars! My God! It's full of stars! My God! It's full of
- stars! My God! It's full of stars! My God! It's full of stars! My God! It's
- full of stars! My God! It's full of stars! My God! It's full of stars! My God!
- It's full of stars! My God! It's full of stars! My God! It's full of stars! My
- God! It's full of stars! My God! It's full of stars! My God! It's full of
- stars! My God! It's full of stars! My God! It's full of stars! My God! It's
- full of stars! My God! It's full of stars! My God! It's full of stars! My God!
- It's full of stars! My God! It's full of stars! My God! It's full of stars! My
- God! It's full of stars! My God! It's full of stars! My God! It's full of
- stars! My God! It's full of stars! My God! It's full of stars! My God! It's
- full of stars! My God! It's full of stars! My God! It's full of stars! My God!
- It's full of stars! My God! It's full of stars! My God! It's full of stars! My
- God! It's full of stars! My God! It's full of stars! My God! It's full of
- stars! My God! It's full of stars! My God! It's full of stars! My God! It's
- T Toggle Screen
+
+
+
+ ┌────────────────────────────────────────┐
+ ││ull of stars! My God! It's full of sta
+ ││
+ │This should float over the top│
+ ││
+ ││
+ └────────────────────────────────────────┘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ T Toggle Screen
@@ -6820,137 +6819,136 @@
font-weight: 700;
}
- .terminal-2660713569-matrix {
+ .terminal-1654293578-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-2660713569-title {
+ .terminal-1654293578-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-2660713569-r1 { fill: #ffff00 }
- .terminal-2660713569-r2 { fill: #c5c8c6 }
- .terminal-2660713569-r3 { fill: #e8e7e5 }
- .terminal-2660713569-r4 { fill: #e1e1e1 }
- .terminal-2660713569-r5 { fill: #14191f }
- .terminal-2660713569-r6 { fill: #dde8f3;font-weight: bold }
- .terminal-2660713569-r7 { fill: #ddedf9 }
+ .terminal-1654293578-r1 { fill: #ffff00 }
+ .terminal-1654293578-r2 { fill: #c5c8c6 }
+ .terminal-1654293578-r3 { fill: #e8e7e5 }
+ .terminal-1654293578-r4 { fill: #e1e1e1 }
+ .terminal-1654293578-r5 { fill: #dde8f3;font-weight: bold }
+ .terminal-1654293578-r6 { fill: #ddedf9 }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- Layers
+ Layers
-
-
-
- ┌────────────────────────────────────────┐
- ││t. I'm sorry, Dave. I'm afraid I
- ││ I can't do that. I'm sorry, Dave.
- │This should float over the top│e. I'm afraid I can't do that. I'm ▂▂
- ││'m sorry, Dave. I'm afraid I can't
- ││'t do that. I'm sorry, Dave. I'm
- └────────────────────────────────────────┘'m afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- do that. I'm sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm
- afraid I can't do that. I'm sorry, Dave. I'm afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- do that. I'm sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm
- afraid I can't do that. I'm sorry, Dave. I'm afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- do that. I'm sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm
- afraid I can't do that. I'm sorry, Dave. I'm afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- do that. I'm sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm
- afraid I can't do that. I'm sorry, Dave. I'm afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- do that. I'm sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm
- afraid I can't do that. I'm sorry, Dave. I'm afraid I can't do that. I'm
- sorry, Dave. I'm afraid I can't do that. I'm sorry, Dave. I'm afraid I can't
- T Toggle Screen
+
+
+
+ ┌────────────────────────────────────────┐
+ ││t. I'm sorry, Dave. I'm afraid I can't
+ ││
+ │This should float over the top│
+ ││
+ ││
+ └────────────────────────────────────────┘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ T Toggle Screen