Skip to content

Commit

Permalink
refactor: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 20, 2022
1 parent ad410ef commit 1aed07a
Show file tree
Hide file tree
Showing 15 changed files with 613 additions and 631 deletions.
94 changes: 43 additions & 51 deletions crates/swc_atoms/words.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*
-infinity
-moz-activehyperlinktext
-moz-animation
-moz-animation-delay
-moz-animation-direction
Expand Down Expand Up @@ -29,7 +31,12 @@
-moz-box-pack
-moz-box-shadow
-moz-box-sizing
-moz-buttondefault
-moz-buttonhoverface
-moz-buttonhovertext
-moz-calc
-moz-cellhighlight
-moz-cellhighlighttext
-moz-column-count
-moz-column-fill
-moz-column-gap
Expand All @@ -40,14 +47,45 @@
-moz-column-span
-moz-column-width
-moz-columns
-moz-combobox
-moz-comboboxtext
-moz-default-background-color
-moz-default-color
-moz-dialog
-moz-dialogtext
-moz-document
-moz-dragtargetzone
-moz-element
-moz-eventreerow
-moz-font-feature-settings
-moz-font-language-override
-moz-font-variant-ligatures
-moz-html-cellhighlight
-moz-html-cellhighlighttext
-moz-hyperlinktext
-moz-hyphens
-moz-keyframes
-moz-mac-accentdarkestshadow
-moz-mac-accentdarkshadow
-moz-mac-accentface
-moz-mac-accentlightesthighlight
-moz-mac-accentlightshadow
-moz-mac-accentregularhighlight
-moz-mac-accentregularshadow
-moz-mac-chrome-active
-moz-mac-chrome-inactive
-moz-mac-focusring
-moz-mac-menuselect
-moz-mac-menushadow
-moz-mac-menutextselect
-moz-margin-end
-moz-margin-start
-moz-menubarhovertext
-moz-menubartext
-moz-menuhover
-moz-menuhovertext
-moz-nativehyperlinktext
-moz-oddtreerow
-moz-padding-end
-moz-padding-start
-moz-perspective
Expand All @@ -67,6 +105,11 @@
-moz-transition-duration
-moz-transition-timing-function
-moz-user-select
-moz-visitedhyperlinktext
-moz-win-accentcolor
-moz-win-accentcolortext
-moz-win-communicationstext
-moz-win-mediatext
-ms-appearance
-ms-flex
-ms-flex-align
Expand All @@ -85,57 +128,6 @@
-ms-high-contrast-adjust
-ms-hyphens
-ms-interpolation-mode
-moz-any
-moz-calc
-moz-document
-moz-keyframes
*
-infinity
-moz-activehyperlinktext
-moz-any
-moz-buttondefault
-moz-buttonhoverface
-moz-buttonhovertext
-moz-calc
-moz-cellhighlight
-moz-cellhighlighttext
-moz-combobox
-moz-comboboxtext
-moz-default-background-color
-moz-default-color
-moz-dialog
-moz-dialogtext
-moz-document
-moz-dragtargetzone
-moz-eventreerow
-moz-html-cellhighlight
-moz-html-cellhighlighttext
-moz-hyperlinktext
-moz-keyframes
-moz-mac-accentdarkestshadow
-moz-mac-accentdarkshadow
-moz-mac-accentface
-moz-mac-accentlightesthighlight
-moz-mac-accentlightshadow
-moz-mac-accentregularhighlight
-moz-mac-accentregularshadow
-moz-mac-chrome-active
-moz-mac-chrome-inactive
-moz-mac-focusring
-moz-mac-menuselect
-moz-mac-menushadow
-moz-mac-menutextselect
-moz-menubarhovertext
-moz-menubartext
-moz-menuhover
-moz-menuhovertext
-moz-nativehyperlinktext
-moz-oddtreerow
-moz-visitedhyperlinktext
-moz-win-accentcolor
-moz-win-accentcolortext
-moz-win-communicationstext
-moz-win-mediatext
-ms-keyframes
-ms-region-fragment
-ms-scroll-chaining
Expand Down
17 changes: 4 additions & 13 deletions crates/swc_css_codegen/tests/fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ impl VisitMut for NormalizeTest {
fn visit_mut_str(&mut self, n: &mut Str) {
n.visit_mut_children_with(self);

n.value = n.value.replace('\0', "\u{FFFD}").into();
n.value = n
.value
.replace('\0', &char::REPLACEMENT_CHARACTER.to_string())
.into();
n.raw = None;
}

Expand All @@ -284,18 +287,6 @@ impl VisitMut for NormalizeTest {
n.raw = None;
}

fn visit_mut_declaration(&mut self, n: &mut Declaration) {
n.visit_mut_children_with(self);

if let DeclarationName::Ident(name) = &mut n.name {
name.value = name.value.to_lowercase().into();
}
fn visit_mut_function(&mut self, n: &mut Function) {
n.visit_mut_children_with(self);

n.name.value = n.name.value.to_lowercase().into();
}

fn visit_mut_an_plus_b_notation(&mut self, n: &mut AnPlusBNotation) {
n.visit_mut_children_with(self);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@keyframes slidein {
from {
transform: translateX(0%);
transform: translatex(0%);
}
to {
transform: translateX(100%);
transform: translatex(100%);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@keyframes "foo" {
from {
transform: translateX(0%);
transform: translatex(0%);
}
to {
transform: translateX(100%);
transform: translatex(100%);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
}
}
@keyframes ONE_TWO_THREE {
FROM {
transform: translateX(0%);
from {
transform: translatex(0%);
}
TO {
transform: translateX(100%);
to {
transform: translatex(100%);
}
}
4 changes: 2 additions & 2 deletions crates/swc_css_codegen/tests/fixture/function/2/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ div {
width: calc(100px + 100px);
width: calc(100px * 2);
width: calc(100px / 2);
width: CALC(100px / 2);
width: CALC(100px / 2);
width: calc(100px / 2);
width: calc(100px / 2);
font-size: max(10 * (1vw + 1vh) / 2, 12px);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2344,17 +2344,17 @@ textarea.form-control-lg {
}
.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label {
opacity: 0.65;
transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem);
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
opacity: 0.65;
transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem);
}
.form-floating > .form-control:-webkit-autofill ~ label {
opacity: 0.65;
transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem);
}
.input-group {
position: relative;
Expand Down Expand Up @@ -5707,11 +5707,11 @@ fieldset:disabled .btn {
}
.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
transform: translateX(100%);
transform: translatex(100%);
}
.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
transform: translateX(-100%);
transform: translatex(-100%);
}
.carousel-fade .carousel-item {
opacity: 0;
Expand Down Expand Up @@ -5975,14 +5975,14 @@ fieldset:disabled .btn {
left: 0;
width: 400px;
border-right: 1px solid rgba(0, 0, 0, 0.2);
transform: translateX(-100%);
transform: translatex(-100%);
}
.offcanvas-end {
top: 0;
right: 0;
width: 400px;
border-left: 1px solid rgba(0, 0, 0, 0.2);
transform: translateX(100%);
transform: translatex(100%);
}
.offcanvas-top {
top: 0;
Expand All @@ -5991,15 +5991,15 @@ fieldset:disabled .btn {
height: 30vh;
max-height: 100%;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
transform: translateY(-100%);
transform: translatey(-100%);
}
.offcanvas-bottom {
right: 0;
left: 0;
height: 30vh;
max-height: 100%;
border-top: 1px solid rgba(0, 0, 0, 0.2);
transform: translateY(100%);
transform: translatey(100%);
}
.offcanvas.show {
transform: none;
Expand Down Expand Up @@ -6406,10 +6406,10 @@ fieldset:disabled .btn {
transform: translate(-50%, -50%) !important;
}
.translate-middle-x {
transform: translateX(-50%) !important;
transform: translatex(-50%) !important;
}
.translate-middle-y {
transform: translateY(-50%) !important;
transform: translatey(-50%) !important;
}
.border {
border: 1px solid #dee2e6 !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fieldset[disabled] .pagination-ellipsis {
left: 50%;
position: absolute;
top: 50%;
transform: translateX(-50%) translateY(-50%) rotate(45deg);
transform: translatex(-50%) translatey(-50%) rotate(45deg);
transform-origin: center center;
}
.delete::before,
Expand Down Expand Up @@ -2859,7 +2859,7 @@ div.icon-text {
left: 50%;
position: absolute;
top: 50%;
transform: translateX(-50%) translateY(-50%) rotate(45deg);
transform: translatex(-50%) translatey(-50%) rotate(45deg);
transform-origin: center center;
}
.tag:not(body).is-delete::before {
Expand Down Expand Up @@ -5605,13 +5605,13 @@ body.has-navbar-fixed-bottom {
background-color: rgba(0, 0, 0, 0.05);
}
.navbar-burger.is-active span:nth-child(1) {
transform: translateY(5px) rotate(45deg);
transform: translatey(5px) rotate(45deg);
}
.navbar-burger.is-active span:nth-child(2) {
opacity: 0;
}
.navbar-burger.is-active span:nth-child(3) {
transform: translateY(-5px) rotate(-45deg);
transform: translatey(-5px) rotate(-45deg);
}
.navbar-menu {
display: none;
Expand Down Expand Up @@ -5838,7 +5838,7 @@ a.navbar-item.is-active,
.navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed {
opacity: 1;
pointer-events: auto;
transform: translateY(0);
transform: translatey(0);
}
.navbar-menu {
flex-grow: 1;
Expand Down Expand Up @@ -5891,7 +5891,7 @@ a.navbar-item.is-active,
opacity: 0;
pointer-events: none;
top: calc(100% + (-4px));
transform: translateY(-5px);
transform: translatey(-5px);
transition-duration: 86ms;
transition-property: opacity, transform;
}
Expand Down

0 comments on commit 1aed07a

Please sign in to comment.