Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions coverage/popular/bootstrap.4.6.2.find.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -877,17 +877,11 @@ coverage/popular/bootstrap.4.6.2.css
7372:3: -ms-flex-line-pack: distribute !important;
7377:3: -ms-flex-line-pack: stretch !important;
7382:3: -ms-flex-item-align: auto !important;
7383:3: align-self: auto !important;
7387:3: -ms-flex-item-align: start !important;
7388:3: align-self: flex-start !important;
7392:3: -ms-flex-item-align: end !important;
7393:3: align-self: flex-end !important;
7397:3: -ms-flex-item-align: center !important;
7398:3: align-self: center !important;
7402:3: -ms-flex-item-align: baseline !important;
7403:3: align-self: baseline !important;
7407:3: -ms-flex-item-align: stretch !important;
7408:3: align-self: stretch !important;
7413:5: -ms-flex-direction: row !important;
7417:5: -ms-flex-direction: column !important;
7421:5: -ms-flex-direction: row-reverse !important;
Expand Down Expand Up @@ -927,17 +921,11 @@ coverage/popular/bootstrap.4.6.2.css
7517:5: -ms-flex-line-pack: distribute !important;
7521:5: -ms-flex-line-pack: stretch !important;
7525:5: -ms-flex-item-align: auto !important;
7526:5: align-self: auto !important;
7529:5: -ms-flex-item-align: start !important;
7530:5: align-self: flex-start !important;
7533:5: -ms-flex-item-align: end !important;
7534:5: align-self: flex-end !important;
7537:5: -ms-flex-item-align: center !important;
7538:5: align-self: center !important;
7541:5: -ms-flex-item-align: baseline !important;
7542:5: align-self: baseline !important;
7545:5: -ms-flex-item-align: stretch !important;
7546:5: align-self: stretch !important;
7552:5: -ms-flex-direction: row !important;
7556:5: -ms-flex-direction: column !important;
7560:5: -ms-flex-direction: row-reverse !important;
Expand Down Expand Up @@ -977,17 +965,11 @@ coverage/popular/bootstrap.4.6.2.css
7656:5: -ms-flex-line-pack: distribute !important;
7660:5: -ms-flex-line-pack: stretch !important;
7664:5: -ms-flex-item-align: auto !important;
7665:5: align-self: auto !important;
7668:5: -ms-flex-item-align: start !important;
7669:5: align-self: flex-start !important;
7672:5: -ms-flex-item-align: end !important;
7673:5: align-self: flex-end !important;
7676:5: -ms-flex-item-align: center !important;
7677:5: align-self: center !important;
7680:5: -ms-flex-item-align: baseline !important;
7681:5: align-self: baseline !important;
7684:5: -ms-flex-item-align: stretch !important;
7685:5: align-self: stretch !important;
7691:5: -ms-flex-direction: row !important;
7695:5: -ms-flex-direction: column !important;
7699:5: -ms-flex-direction: row-reverse !important;
Expand Down Expand Up @@ -1027,17 +1009,11 @@ coverage/popular/bootstrap.4.6.2.css
7795:5: -ms-flex-line-pack: distribute !important;
7799:5: -ms-flex-line-pack: stretch !important;
7803:5: -ms-flex-item-align: auto !important;
7804:5: align-self: auto !important;
7807:5: -ms-flex-item-align: start !important;
7808:5: align-self: flex-start !important;
7811:5: -ms-flex-item-align: end !important;
7812:5: align-self: flex-end !important;
7815:5: -ms-flex-item-align: center !important;
7816:5: align-self: center !important;
7819:5: -ms-flex-item-align: baseline !important;
7820:5: align-self: baseline !important;
7823:5: -ms-flex-item-align: stretch !important;
7824:5: align-self: stretch !important;
7830:5: -ms-flex-direction: row !important;
7834:5: -ms-flex-direction: column !important;
7838:5: -ms-flex-direction: row-reverse !important;
Expand Down Expand Up @@ -1077,17 +1053,11 @@ coverage/popular/bootstrap.4.6.2.css
7934:5: -ms-flex-line-pack: distribute !important;
7938:5: -ms-flex-line-pack: stretch !important;
7942:5: -ms-flex-item-align: auto !important;
7943:5: align-self: auto !important;
7946:5: -ms-flex-item-align: start !important;
7947:5: align-self: flex-start !important;
7950:5: -ms-flex-item-align: end !important;
7951:5: align-self: flex-end !important;
7954:5: -ms-flex-item-align: center !important;
7955:5: align-self: center !important;
7958:5: -ms-flex-item-align: baseline !important;
7959:5: align-self: baseline !important;
7962:5: -ms-flex-item-align: stretch !important;
7963:5: align-self: stretch !important;
8028:3: -webkit-user-select: all !important;
8029:3: -moz-user-select: all !important;
8034:3: -webkit-user-select: auto !important;
Expand Down
39 changes: 0 additions & 39 deletions coverage/popular/bootstrap.5.3.0.find.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,12 @@ coverage/popular/bootstrap.5.3.0.css
7156:5: position: -webkit-sticky;
7159:5: z-index: 1020;
7165:3: align-items: center;
7166:3: align-self: stretch;
7173:3: align-self: stretch;
7183:3: clip: rect(0, 0, 0, 0) !important;
7184:3: white-space: nowrap !important;
7198:3: z-index: 1;
7199:3: content: "";
7204:3: text-overflow: ellipsis;
7205:3: white-space: nowrap;
7210:3: align-self: stretch;
7218:3: vertical-align: baseline !important;
7222:3: vertical-align: top !important;
7226:3: vertical-align: middle !important;
Expand Down Expand Up @@ -434,12 +431,6 @@ coverage/popular/bootstrap.5.3.0.css
7826:3: align-items: center !important;
7830:3: align-items: baseline !important;
7834:3: align-items: stretch !important;
7862:3: align-self: auto !important;
7866:3: align-self: flex-start !important;
7870:3: align-self: flex-end !important;
7874:3: align-self: center !important;
7878:3: align-self: baseline !important;
7882:3: align-self: stretch !important;
8356:3: -moz-column-gap: 0 !important;
8361:3: -moz-column-gap: 0.25rem !important;
8366:3: -moz-column-gap: 0.5rem !important;
Expand Down Expand Up @@ -530,12 +521,6 @@ coverage/popular/bootstrap.5.3.0.css
9340:5: align-items: center !important;
9343:5: align-items: baseline !important;
9346:5: align-items: stretch !important;
9367:5: align-self: auto !important;
9370:5: align-self: flex-start !important;
9373:5: align-self: flex-end !important;
9376:5: align-self: center !important;
9379:5: align-self: baseline !important;
9382:5: align-self: stretch !important;
9744:5: -moz-column-gap: 0 !important;
9748:5: -moz-column-gap: 0.25rem !important;
9752:5: -moz-column-gap: 0.5rem !important;
Expand Down Expand Up @@ -563,12 +548,6 @@ coverage/popular/bootstrap.5.3.0.css
9901:5: align-items: center !important;
9904:5: align-items: baseline !important;
9907:5: align-items: stretch !important;
9928:5: align-self: auto !important;
9931:5: align-self: flex-start !important;
9934:5: align-self: flex-end !important;
9937:5: align-self: center !important;
9940:5: align-self: baseline !important;
9943:5: align-self: stretch !important;
10305:5: -moz-column-gap: 0 !important;
10309:5: -moz-column-gap: 0.25rem !important;
10313:5: -moz-column-gap: 0.5rem !important;
Expand Down Expand Up @@ -596,12 +575,6 @@ coverage/popular/bootstrap.5.3.0.css
10462:5: align-items: center !important;
10465:5: align-items: baseline !important;
10468:5: align-items: stretch !important;
10489:5: align-self: auto !important;
10492:5: align-self: flex-start !important;
10495:5: align-self: flex-end !important;
10498:5: align-self: center !important;
10501:5: align-self: baseline !important;
10504:5: align-self: stretch !important;
10866:5: -moz-column-gap: 0 !important;
10870:5: -moz-column-gap: 0.25rem !important;
10874:5: -moz-column-gap: 0.5rem !important;
Expand Down Expand Up @@ -629,12 +602,6 @@ coverage/popular/bootstrap.5.3.0.css
11023:5: align-items: center !important;
11026:5: align-items: baseline !important;
11029:5: align-items: stretch !important;
11050:5: align-self: auto !important;
11053:5: align-self: flex-start !important;
11056:5: align-self: flex-end !important;
11059:5: align-self: center !important;
11062:5: align-self: baseline !important;
11065:5: align-self: stretch !important;
11427:5: -moz-column-gap: 0 !important;
11431:5: -moz-column-gap: 0.25rem !important;
11435:5: -moz-column-gap: 0.5rem !important;
Expand Down Expand Up @@ -662,12 +629,6 @@ coverage/popular/bootstrap.5.3.0.css
11584:5: align-items: center !important;
11587:5: align-items: baseline !important;
11590:5: align-items: stretch !important;
11611:5: align-self: auto !important;
11614:5: align-self: flex-start !important;
11617:5: align-self: flex-end !important;
11620:5: align-self: center !important;
11623:5: align-self: baseline !important;
11626:5: align-self: stretch !important;
11988:5: -moz-column-gap: 0 !important;
11992:5: -moz-column-gap: 0.25rem !important;
11996:5: -moz-column-gap: 0.5rem !important;
Expand Down
7 changes: 0 additions & 7 deletions coverage/popular/foundation.6.7.5.find.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,28 +209,24 @@ coverage/popular/foundation.6.7.5.css
1864:11: align-items: flex-start; }
1867:3: -webkit-align-self: flex-start;
1868:7: -ms-flex-item-align: start;
1869:11: align-self: flex-start; }
1872:3: -webkit-box-align: end;
1873:3: -webkit-align-items: flex-end;
1874:7: -ms-flex-align: end;
1875:11: align-items: flex-end; }
1878:3: -webkit-align-self: flex-end;
1879:7: -ms-flex-item-align: end;
1880:11: align-self: flex-end; }
1883:3: -webkit-box-align: center;
1884:3: -webkit-align-items: center;
1885:7: -ms-flex-align: center;
1886:11: align-items: center; }
1889:3: -webkit-align-self: center;
1890:7: -ms-flex-item-align: center;
1891:11: align-self: center; }
1894:3: -webkit-box-align: stretch;
1895:3: -webkit-align-items: stretch;
1896:7: -ms-flex-align: stretch;
1897:11: align-items: stretch; }
1900:3: -webkit-align-self: stretch;
1901:7: -ms-flex-item-align: stretch;
1902:11: align-self: stretch; }
1905:3: -webkit-box-pack: center;
1906:3: -webkit-justify-content: center;
1907:7: -ms-flex-pack: center;
Expand Down Expand Up @@ -460,7 +456,6 @@ coverage/popular/foundation.6.7.5.css
2835:7: -ms-flex: 0 0 auto;
2841:5: -webkit-align-self: stretch;
2842:9: -ms-flex-item-align: stretch;
2843:13: align-self: stretch;
2871:3: -webkit-appearance: none;
2872:6: -moz-appearance: none;
2875:3: border-radius: 0;
Expand Down Expand Up @@ -662,14 +657,12 @@ coverage/popular/foundation.6.7.5.css
3617:9: -ms-flex-flow: column nowrap;
3624:7: -webkit-align-self: stretch;
3625:11: -ms-flex-item-align: stretch;
3626:15: align-self: stretch;
3630:5: -webkit-box-orient: vertical;
3631:5: -webkit-box-direction: normal;
3632:5: -webkit-flex-flow: column nowrap;
3633:9: -ms-flex-flow: column nowrap;
3640:7: -webkit-align-self: stretch;
3641:11: -ms-flex-item-align: stretch;
3642:15: align-self: stretch;
3646:5: background: #1779ba;
3649:5: background: #1779ba;
3652:5: -webkit-box-pack: start;
Expand Down
1 change: 0 additions & 1 deletion coverage/popular/mini.css.3.0.1.find.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ coverage/popular/mini.css.3.0.1.css
219:3: text-decoration: none;
231:3: text-decoration: underline;
651:3: justify-content: space-between;
652:3: align-self: center;
675:3: border-radius: 0;
684:3: -o-object-fit: cover;
685:3: object-fit: cover;
Expand Down
6 changes: 0 additions & 6 deletions coverage/popular/missing.1.2.0.find.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ coverage/popular/missing.1.2.0.css
1321:3: z-index: 5;
1327:3: align-items: center;
1331:5: align-items: start;
1353:5: align-self: stretch;
1368:5: text-decoration: none;
1372:7: text-decoration: underline;
1381:5: content: "";
Expand Down Expand Up @@ -134,11 +133,6 @@ coverage/popular/missing.1.2.0.css
2377:3: align-items: baseline;
2380:3: align-items: center;
2383:3: align-items: stretch;
2386:3: align-self: start;
2389:3: align-self: end;
2392:3: align-self: baseline;
2395:3: align-self: center;
2398:3: align-self: stretch;
2472:3: grid-column: 1;
2481:3: grid-column: 2;
2490:3: grid-column: 3;
Expand Down
1 change: 1 addition & 0 deletions crates/css_ast/src/property_atoms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ pub const CSS_PROPERTY_ATOMS: &[crate::CssAtomSet] = &[
HyphenateLimitLines,
HyphenateLimitZone,
Hyphens,
ImageAnimation,
ImageOrientation,
ImageRendering,
ImageResolution,
Expand Down
2 changes: 2 additions & 0 deletions crates/css_ast/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ mod line_style_list;
mod line_width_list;
mod line_width_or_repeat;
mod none_or;
mod normal_or;
mod opacity_value;
mod outline_style;
mod overflow_position;
Expand Down Expand Up @@ -141,6 +142,7 @@ pub use line_style_list::*;
pub use line_width_list::*;
pub use line_width_or_repeat::*;
pub use none_or::*;
pub use normal_or::*;
pub use opacity_value::*;
pub use outline_style::*;
pub use overflow_position::*;
Expand Down
57 changes: 57 additions & 0 deletions crates/css_ast/src/types/normal_or.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
use super::prelude::*;
use css_parse::token_macros::Ident;

#[derive(Parse, Peek, ToCursors, ToSpan, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "visitable", derive(csskit_derives::Visitable))]
pub enum NormalOr<T> {
#[cfg_attr(feature = "visitable", visit(skip))]
#[atom(CssAtomSet::Normal)]
Normal(Ident),
Some(T),
}

impl<T: Copy> Copy for NormalOr<T> {}

impl<T> From<NormalOr<T>> for Cursor
where
T: Copy,
Cursor: From<T>,
{
fn from(value: NormalOr<T>) -> Self {
match value {
NormalOr::Normal(ident) => ident.into(),
NormalOr::Some(t) => t.into(),
}
}
}

#[cfg(test)]
mod tests {
use super::*;
use crate::CssAtomSet;
use css_parse::{T, assert_parse, assert_parse_error};

type NormalOrIdent = NormalOr<T![Ident]>;

#[test]
fn size_test() {
assert_eq!(std::mem::size_of::<NormalOrIdent>(), 16);
}

#[test]
fn test_parses() {
assert_parse!(CssAtomSet::ATOMS, NormalOrIdent, "normal", NormalOrIdent::Normal(_));
assert_parse!(CssAtomSet::ATOMS, NormalOrIdent, "all", NormalOrIdent::Some(_));
assert_parse!(CssAtomSet::ATOMS, NormalOrIdent, "auto", NormalOrIdent::Some(_));
assert_parse!(CssAtomSet::ATOMS, NormalOrIdent, "none", NormalOrIdent::Some(_));
}

#[test]
fn test_errors() {
assert_parse_error!(CssAtomSet::ATOMS, NormalOrIdent, "");
assert_parse_error!(CssAtomSet::ATOMS, NormalOrIdent, "0");
assert_parse_error!(CssAtomSet::ATOMS, NormalOrIdent, "normal normal");
assert_parse_error!(CssAtomSet::ATOMS, NormalOrIdent, "normal all");
}
}
17 changes: 12 additions & 5 deletions crates/css_ast/src/values/align/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
mod tests {
use super::super::*;
use crate::CssAtomSet;
use css_parse::assert_parse;
use css_parse::{assert_parse, assert_parse_error};

#[test]
fn size_test() {
assert_eq!(std::mem::size_of::<AlignContentStyleValue>(), 32);
// assert_eq!(std::mem::size_of::<JustifyContentStyleValue>(), 1);
// assert_eq!(std::mem::size_of::<PlaceContentStyleValue>(), 48);
// assert_eq!(std::mem::size_of::<JustifySelfStyleValue>(), 1);
// assert_eq!(std::mem::size_of::<AlignSelfStyleValue>(), 32);
assert_eq!(std::mem::size_of::<AlignSelfStyleValue>(), 32);
// assert_eq!(std::mem::size_of::<PlaceSelfStyleValue>(), 1);
// assert_eq!(std::mem::size_of::<JustifyItemsStyleValue>(), 1);
// assert_eq!(std::mem::size_of::<AlignItemsStyleValue>(), 1);
Expand All @@ -27,11 +27,18 @@ mod tests {
assert_parse!(CssAtomSet::ATOMS, AlignContentStyleValue, "flex-end");
// assert_parse!(CssAtomSet::ATOMS, PlaceContentStyleValue, "unsafe flex-end");
// assert_parse!(CssAtomSet::ATOMS, PlaceContentStyleValue, "flex-end");
// assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "normal");
// assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "safe flex-start");
// assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "flex-start");
assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "normal");
assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "safe normal");
assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "safe end");
assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "safe flex-start");
assert_parse!(CssAtomSet::ATOMS, AlignSelfStyleValue, "flex-start");
assert_parse!(CssAtomSet::ATOMS, RowGapStyleValue, "normal");
assert_parse!(CssAtomSet::ATOMS, ColumnGapStyleValue, "1px");
assert_parse!(CssAtomSet::ATOMS, GapStyleValue, "normal 1px");
}

#[test]
fn test_errors() {
assert_parse_error!(CssAtomSet::ATOMS, AlignSelfStyleValue, "none");
}
}
Loading
Loading