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 14, 2022
1 parent dc54415 commit e435db2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
2 changes: 2 additions & 0 deletions crates/swc_css_prefixer/data/prefixes_and_browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3928,6 +3928,8 @@
"safari": "14.1",
"ios": "14.8",
"firefox": "69"
}
],
"font-face-format-ident": [
{
"chrome": "4",
Expand Down
25 changes: 15 additions & 10 deletions crates/swc_css_prefixer/src/prefixer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::match_like_matches_macro)]

use core::f64::consts::PI;
use std::mem::take;

Expand Down Expand Up @@ -576,7 +577,20 @@ impl VisitMut for CalcReplacer<'_> {
expressions: calc_sum.expressions,
});
}
pub struct FontFaceFormat {}
}
}
}

fn replace_calc<N>(node: &mut N, to: Option<&JsWord>)
where
N: for<'aa> VisitMutWith<CalcReplacer<'aa>>,
{
node.visit_mut_with(&mut CalcReplacer {
inside_calc: false,
to,
});
}

pub struct FontFaceFormatOldSyntax {}

impl VisitMut for FontFaceFormatOldSyntax {
Expand Down Expand Up @@ -617,15 +631,6 @@ impl VisitMut for FontFaceFormatOldSyntax {
}
}

fn replace_calc<N>(node: &mut N, to: Option<&JsWord>)
where
N: for<'aa> VisitMutWith<CalcReplacer<'aa>>,
{
node.visit_mut_with(&mut CalcReplacer {
inside_calc: false,
to,
});
pub fn font_face_format<N>(node: &mut N)
pub fn font_face_format_old_syntax<N>(node: &mut N)
where
N: VisitMutWith<FontFaceFormatOldSyntax>,
Expand Down

0 comments on commit e435db2

Please sign in to comment.