|
1 | 1 | mod custom; |
2 | 2 | pub mod margin_padding; |
3 | 3 | pub mod background; |
| 4 | +pub mod outline; |
4 | 5 |
|
5 | 6 | use cssparser::*; |
6 | 7 | use custom::*; |
7 | 8 | use background::*; |
| 9 | +use outline::*; |
8 | 10 | use crate::values::{image::*, length::*, border::*, border_image::*, border_radius::*, rect::*, color::*}; |
9 | 11 | use super::values::traits::{Parse, ToCss}; |
10 | 12 |
|
@@ -122,6 +124,11 @@ pub enum Property { |
122 | 124 | BorderInlineStart(Border), |
123 | 125 | BorderInlineEnd(Border), |
124 | 126 |
|
| 127 | + Outline(Outline), |
| 128 | + OutlineColor(CssColor), |
| 129 | + OutlineStyle(OutlineStyle), |
| 130 | + OutlineWidth(BorderSideWidth), |
| 131 | + |
125 | 132 | MarginTop(LengthPercentageOrAuto), |
126 | 133 | MarginBottom(LengthPercentageOrAuto), |
127 | 134 | MarginLeft(LengthPercentageOrAuto), |
@@ -169,6 +176,9 @@ pub enum Property { |
169 | 176 | ScrollPaddingBlock(Size2D<LengthPercentageOrAuto>), |
170 | 177 | ScrollPaddingInline(Size2D<LengthPercentageOrAuto>), |
171 | 178 | ScrollPadding(Rect<LengthPercentageOrAuto>), |
| 179 | + |
| 180 | + // shorthands: transitions, animations, columns, font, font-variant, list-style |
| 181 | + // flex, grid, gap, place-items, place-self, inset |
172 | 182 | } |
173 | 183 |
|
174 | 184 | impl Property { |
@@ -279,6 +289,10 @@ impl Property { |
279 | 289 | "border-end-start-radius" => property!(BorderEndStartRadius, Size2D), |
280 | 290 | "border-end-end-radius" => property!(BorderEndEndRadius, Size2D), |
281 | 291 | "border-radius" => property!(BorderRadius, BorderRadius), |
| 292 | + "outline" => property!(Outline, Outline), |
| 293 | + "outline-color" => property!(OutlineColor, CssColor), |
| 294 | + "outline-style" => property!(OutlineStyle, OutlineStyle), |
| 295 | + "outline-width" => property!(OutlineWidth, BorderSideWidth), |
282 | 296 | "margin-left" => property!(MarginLeft, LengthPercentageOrAuto), |
283 | 297 | "margin-right" => property!(MarginRight, LengthPercentageOrAuto), |
284 | 298 | "margin-top" => property!(MarginTop, LengthPercentageOrAuto), |
@@ -447,6 +461,10 @@ impl Property { |
447 | 461 | BorderEndStartRadius(val) => property!("border-end-start-radius", val), |
448 | 462 | BorderEndEndRadius(val) => property!("border-end-end-radius", val), |
449 | 463 | BorderRadius(val) => property!("border-radius", val), |
| 464 | + Outline(val) => property!("outline", val), |
| 465 | + OutlineColor(val) => property!("outline-color", val), |
| 466 | + OutlineStyle(val) => property!("outline-style", val), |
| 467 | + OutlineWidth(val) => property!("outline-width", val), |
450 | 468 | MarginLeft(val) => property!("margin-left", val), |
451 | 469 | MarginRight(val) => property!("margin-right", val), |
452 | 470 | MarginTop(val) => property!("margin-top", val), |
|
0 commit comments