file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_css_lints/tests/rules/pass/no-duplicate-at-import-rules/8/input.css | CSS | @IMPORT "a.css";
@ImPoRt "b.css";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/no-empty-source/input.css | CSS | a {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/no-invalid-position-at-import-rule/default/input.css | CSS | @charset "utf-8";
@layer framework, override;
@import "kumiko.css";
@import "reina.css";
a {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/no-invalid-position-at-import-rule/ignored/input.css | CSS | @charset "utf-8";
@hibike {
}
@x-rule {
}
@import "kumiko.css";
@import "reina.css";
a {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/selector-max-class/custom/input.css | CSS | .a.b.c.d.e {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/selector-max-class/default/input.css | CSS | .a {
}
.a.b {
}
.a.b.c {
}
.a.b,
.c.d {
}
.a.b :not(.c.d) {
}
.ab.cd[disabled]:hover {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/selector-max-combinators/custom/input.css | CSS | .a {}
.a .b {}
.a .b .c {}
.a .b .c .d {}
.a .b .c .d .e {}
.a + .b ~ .c > .d .e {}
.a + .b ~ .c > .d .e || .f {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/selector-max-combinators/default/input.css | CSS | .a.b.c.d {}
.a .b.c.d {}
.a .b .c.d {}
.a .b .c .d {}
.a + .b .c > .d {}
.a ~ .b > .c + .d {}
.a .b + .c {}
.a + .b ~ .c > .d, .e > .f + .g ~ .h {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/unit-no-unknown/default/input.css | CSS | a { line-height: 1; }
a { font-size: 100%; }
a { margin: 1em; }
a { margin: 1Em; }
a { margin: 1EM; }
a { margin: 1ex; }
a { margin: 1%; }
a { margin: 1px; }
a { margin: 1cm; }
a { margin: 1mm; }
a { margin: 1in; }
a { margin: 1pt; }
a { margin: 1pc; }
a { margin: 1ch; }
a { margin: 1rem; }
a { margin: 1vh; }
a { margi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_lints/tests/rules/pass/unit-no-unknown/ignored-units/input.css | CSS | a {
width: 2lightyear;
width: 6ax;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/alpha_value.rs | Rust | use swc_common::DUMMY_SP;
use swc_css_ast::*;
use super::Compressor;
pub(super) fn compress_alpha_value(alpha_value: &mut AlphaValue) {
match alpha_value {
AlphaValue::Percentage(Percentage {
value: number,
span,
..
}) if number.value % 10.0 == 0.0 => {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/angle.rs | Rust | use swc_css_ast::*;
use swc_css_utils::angle_to_deg;
use super::Compressor;
impl Compressor {
pub(super) fn compress_angle_in_component_value(
&mut self,
component_value: &mut ComponentValue,
) {
if !self.ctx.in_transform_function {
return;
}
if let Some(sp... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/calc_sum.rs | Rust | use rustc_hash::FxHashMap;
use swc_atoms::Atom;
use swc_common::Span;
use swc_css_ast::*;
use super::Compressor;
use crate::compressor::math::{is_calc_function_name, transform_calc_value_into_component_value};
// Calc-operator node of the calculation tree
// https://www.w3.org/TR/css-values-4/#calculation-tree-calc-o... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/color.rs | Rust | use swc_atoms::Atom;
use swc_common::DUMMY_SP;
use swc_css_ast::*;
use swc_css_utils::{angle_to_deg, hsl_to_rgb, hwb_to_rgb, to_rgb255, NAMED_COLORS};
use super::Compressor;
use crate::compressor::alpha_value::compress_alpha_value;
fn compress_alpha_in_hex(value: &Atom) -> Option<&str> {
let length = value.len();... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/container.rs | Rust | use swc_css_ast::*;
use super::Compressor;
use crate::compressor::math::{is_calc_function_name, transform_calc_value_into_component_value};
impl Compressor {
pub(super) fn compress_calc_sum_in_size_feature_value(&mut self, n: &mut SizeFeatureValue) {
match n {
SizeFeatureValue::Function(Functi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/ctx.rs | Rust | use std::ops::{Deref, DerefMut};
use super::Compressor;
#[derive(Clone, Copy)]
pub(super) struct Ctx {
pub in_math_function: bool,
pub in_logic_combinator_selector: bool,
pub in_transform_function: bool,
pub in_keyframe_block: bool,
pub preserve_alpha_value: bool,
}
impl Default for Ctx {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/declaration.rs | Rust | use swc_common::{util::take::Take, Span, DUMMY_SP};
use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_declaration(&self, declaration: &mut Declaration) {
if let DeclarationName::Ident(Ident { value: name, .. }) = &mut declaration.name {
*name = name.to_ascii_l... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/easing_function.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_easing_function(&mut self, component_value: &mut ComponentValue) {
match component_value {
ComponentValue::Function(function)
if function.name == "cubic-bezier" && function.value.len() == 7 =>
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/frequency.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_frequency(&mut self, frequency: &mut Frequency) {
match &*frequency.unit.value {
"hz" if frequency.value.value > 0.0 && frequency.value.value % 1000.0 == 0.0 => {
let new_value = frequency.value... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/import.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_import_href(&mut self, import_href: &mut ImportHref) {
if let ImportHref::Url(Url {
value: Some(value),
modifiers,
span,
..
}) = import_href
{
if ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/keyframes.rs | Rust | use swc_common::DUMMY_SP;
use swc_css_ast::*;
use super::Compressor;
use crate::is_css_wide_keyword;
impl Compressor {
pub(super) fn compress_keyframes_at_rule(&mut self, at_rule: &mut AtRule) {
match at_rule.prelude.as_deref() {
Some(AtRulePrelude::KeyframesPrelude(KeyframesName::Str(string))... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/length.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
fn convert_length(&mut self, value: f64, from_unit: &str, to_unit: &str) -> f64 {
match to_unit {
"cm" => match from_unit {
"cm" => value,
"mm" => value / 10.0,
"q" => value / 40.0,
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/math/mod.rs | Rust | use swc_css_ast::*;
pub fn is_calc_function_name(function_name: &FunctionName) -> bool {
*function_name == "calc" || *function_name == "-webkit-calc" || *function_name == "-moz-calc"
}
pub fn transform_calc_value_into_component_value(calc_value: &CalcValue) -> Option<ComponentValue> {
match &calc_value {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/media.rs | Rust | use std::mem::take;
use swc_common::DUMMY_SP;
use swc_css_ast::*;
use super::Compressor;
use crate::{
compressor::math::{is_calc_function_name, transform_calc_value_into_component_value},
util::dedup,
};
impl Compressor {
fn is_first_media_in_parens(&self, media_condition: &MediaCondition) -> bool {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/mod.rs | Rust | use swc_css_ast::*;
use swc_css_utils::serialize_ident;
use swc_css_visit::{VisitMut, VisitMutWith};
use self::ctx::Ctx;
mod alpha_value;
mod angle;
mod calc_sum;
mod color;
mod container;
mod ctx;
mod declaration;
mod easing_function;
mod frequency;
mod import;
mod keyframes;
mod length;
mod math;
mod media;
mod rul... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/rules.rs | Rust | use std::mem::take;
use rustc_hash::FxHashMap;
use swc_atoms::Atom;
use swc_common::{util::take::Take, EqIgnoreSpan, Span, Spanned};
use swc_css_ast::*;
use swc_css_visit::{Visit, VisitMutWith, VisitWith};
use super::Compressor;
enum ParentNode<'a> {
Stylesheet(&'a mut Stylesheet),
SimpleBlock(&'a mut Simple... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/selector.rs | Rust | use swc_common::DUMMY_SP;
use swc_css_ast::*;
use super::Compressor;
use crate::util::dedup;
impl Compressor {
pub(super) fn compress_selector_list(&mut self, selector_list: &mut SelectorList) {
dedup(&mut selector_list.children);
}
pub(super) fn compress_forgiving_selector_list(
&mut sel... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/supports.rs | Rust | use std::mem::take;
use swc_common::DUMMY_SP;
use swc_css_ast::*;
use super::Compressor;
use crate::util::dedup;
impl Compressor {
fn is_first_supports_in_parens(&self, supports_condition: &SupportsCondition) -> bool {
if let Some(SupportsConditionType::SupportsInParens(_)) =
supports_conditi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/time.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_time(&self, time: &mut Time) {
match &*time.unit.value {
"ms" if time.value.value == 0.0 || time.value.value >= 100.0 => {
let new_value = time.value.value / 1000.0;
time.value ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/transform_function.rs | Rust | use swc_common::Spanned;
use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_transform_function(&self, component_value: &mut ComponentValue) {
match component_value {
ComponentValue::Function(function)
if function.name == "translate" && function.... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/unicode_range.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_unicode_range(&self, unicode_range: &mut UnicodeRange) {
unicode_range.start = unicode_range.start.to_ascii_lowercase();
if let Some(end) = &mut unicode_range.end {
*end = end.to_ascii_lowercase();
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/compressor/url.rs | Rust | use swc_css_ast::*;
use super::Compressor;
impl Compressor {
pub(super) fn compress_url(&self, url: &mut Url) {
if url.name.value != "url" {
return;
}
if let Some(modifiers) = &url.modifiers {
if !modifiers.is_empty() {
return;
}
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/lib.rs | Rust | #![deny(clippy::all)]
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::needless_update)]
#![allow(clippy::mutable_key_type)]
use swc_atoms::Atom;
use swc_css_ast::*;
use swc_css_visit::VisitMutWith;
use self::{compressor::compressor, options::MinifyOptions};
mod compressor;
pub mod options;
pub(crate) mo... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/options.rs | Rust | use serde::{Deserialize, Serialize};
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
pub struct MinifyOptions {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/src/util.rs | Rust | use std::mem::take;
use swc_common::EqIgnoreSpan;
pub(crate) fn dedup<T>(v: &mut Vec<T>)
where
T: EqIgnoreSpan,
{
let mut remove_list = Vec::new();
for (i, i1) in v.iter().enumerate() {
for (j, j1) in v.iter().enumerate() {
if i < j && i1.eq_ignore_span(j1) {
remove_li... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture.rs | Rust | use std::path::PathBuf;
use swc_css_ast::Stylesheet;
use swc_css_codegen::{
writer::basic::{BasicCssWriter, BasicCssWriterConfig},
CodeGenerator, CodegenConfig, Emit,
};
use swc_css_minifier::minify;
use swc_css_parser::parse_file;
use testing::NormalizedOutput;
#[testing::fixture("tests/fixture/**/input.css"... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-alpha-value/input.css | CSS | .class1 {
opacity: 0
}
.class2 {
opacity: 0%;
}
.class3 {
opacity: 0.5;
}
.class4 {
opacity: 50%;
}
.class5 {
opacity: 1;
}
.class6 {
opacity: 100%;
}
.class7 {
shape-image-threshold: 70%;
}
.class8 {
fill-opacity: 50%;
}
.class9 {
stroke-opacity: 50%;
}
.class10 {
sha... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-alpha-value/output.min.css | CSS | .class1{opacity:0}.class2{opacity:0}.class3,.class4{opacity:.5}.class5{opacity:1}.class6{opacity:1}.class7{shape-image-threshold:.7}.class8{fill-opacity:.5}.class9{stroke-opacity:.5}.class10{shape-image-threshold:.5}.class11{opacity:53%}.class12{opacity:0}.class13{color:#7b7b7b}.class14{color:rgba(123,123,123,.2)}.clas... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-animation/input.css | CSS | .foo {
animation-name: "none", "unset", "foo bar";
}
.foo {
animation-name: "none", foo;
}
.foo {
animation-name: none, none;
}
/* Test CSS-wide keywords */
.foo {
animation-name: "inherit";
}
.foo {
animation-name: "initial";
}
.foo {
animation-name: "unset";
}
.foo {
animation-name: "reve... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-animation/output.min.css | CSS | .foo{animation-name:"none","unset",foo\ bar;animation-name:"none",foo;animation-name:none,none;animation-name:"inherit";animation-name:"initial";animation-name:"unset";animation-name:"revert";animation-name:"revert-layer";animation-name:"default";animation-name:foo,"revert";animation-name:string,"revert";animation-name... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8/input.css | CSS | @charset "utf-8";
a {
--foo: "test";
color: red;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8/output.min.css | CSS | a{--foo:"test";color:red}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8_with_non_ascii_characters/input.css | CSS | @charset "utf-8";
a {
--foo: "тест";
color: red;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8_with_non_ascii_characters/output.min.css | CSS | @charset "utf-8";a{--foo:"тест";color:red}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8_with_non_ascii_characters_1/input.css | CSS | @charset "utf-8";
a {
content: "тест";
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/charset/utf_8_with_non_ascii_characters_1/output.min.css | CSS | @charset "utf-8";a{content:"тест"}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/counter-style/input.css | CSS | @counter-style my-alpha {}
@counter-style my-alpha {
system: fixed;
symbols: A B C;
suffix: "0";
}
@COUNTER-STYLE my-alpha {
system: fixed;
symbols: A B C;
suffix: "1";
}
@counter-style my-alpha-other {
system: fixed;
symbols: Ⓐ Ⓑ Ⓒ;
suffix: "2";
}
@counter-style my-alpha-one {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/counter-style/output.min.css | CSS | @counter-style my-alpha-one{system:fixed;symbols:Ⓐ Ⓑ Ⓒ;suffix:"2"}@media(max-width:400px){@supports(display:flex){@counter-style my-alpha{system:fixed;symbols:a b c;suffix:"media-supports-0"}}@counter-style my-alpha{system:fixed;symbols:Ⓐ Ⓑ Ⓒ;suffix:"media-1"}}@counter-style my-alpha{system:fixed;symbols:Ⓐ Ⓑ Ⓒ;suffix:"... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/import/input.css | CSS | @import 'custom.css';
@import url(custom.css);
@import url( custom.css );
@import url('custom.css');
@import url("custom.css");
@import url('custo(m.css');
@import url('custom.css') screen and (orientation:landscape);
@import url("fallback-layout.css") supports(not (display: flex));
@import "mystyle.css" supports(d... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/import/output.min.css | CSS | @import"custom.css";@import"custom.css";@import"custom.css";@import"custom.css";@import"custom.css";@import"custo(m.css";@import"custom.css"screen and (orientation:landscape);@import"fallback-layout.css"supports(not (display:flex));@import"mystyle.css"supports(display:flex);@import"mystyle.css"supports((display:flex));... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/keyframes/input.css | CSS | @-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@-WEBKIT-KEYFRAMES fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@counter-styl... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/keyframes/output.min.css | CSS | @counter-style fade-in{system:fixed;symbols:Ⓐ Ⓑ Ⓒ;suffix:"2"}@media(max-width:500px){@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:.8}}@keyframes fade-in{0%{opacity:0}to{opacity:.8}}@supports(display:flex){@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}}}@-webki... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/layer/input.css | CSS | @layer default, theme, components;
@layer foo.bar;
@layer foo.bar, baz;
@layer framework {
@layer layout {
@layer base {
}
}
}
@layer a{
@layer b {
div {color: yellow; margin: 0px;}
}
}
@layer framework {
@layer base {
p { margin-block: 0.75em; }
}
@layer t... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/layer/output.min.css | CSS | @layer default,theme,components;@layer foo.bar;@layer foo.bar,baz;@layer a{@layer b{div{color:yellow;margin:0}}}@layer framework{@layer base{p{margin-block:.75em}}@layer theme{p{color:#222}}}@layer framework.theme{blockquote{color:rebeccapurple}}@layer{@layer foo{.class{color:red}}}@layer framework{h1,h2{color:maroon;b... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/media/input.css | CSS | @media print {
body { font-size: 10pt; }
}
@media print, print {
body { font-size: 10pt; }
}
@media (min-width: 900px), (min-width: 900px) {
a {
color: red;
}
}
@media only screen and (min-width: 320px), only screen and (min-width: 320px) {
body { line-height: 1.4; }
}
@media (400px <= ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/media/output.min.css | CSS | @media print{body{font-size:10pt}}@media(min-width:900px){a{color:red}}@media only screen and (min-width:320px){body{line-height:1.4}}@media(400px<=width<=700px){body{line-height:1.4}}@media screen and (min-width:900px){article{padding:1rem 3rem}}@media(height>600px){body{line-height:1.4}}@media(400px<=width<=700px){bo... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/starting-style/input.css | CSS | @starting-style {
h1 {
background-color: transparent;
}
@layer foo {
div {
height: 100px;
}
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/starting-style/output.min.css | CSS | @starting-style{h1{background-color:transparent}@layer foo{div{height:100px}}}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/supports/input.css | CSS | @supports (display: flex) {
a {
color: red;
}
}
@supports (display: grid) and (display: flex) and (display: flex) {
a {
color: red;
}
}
@supports (display: grid) or (display: flex) or (display: flex) {
a {
color: red;
}
}
@supports (((display: flex))) {
a {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-at-rule/supports/output.min.css | CSS | @supports(display:flex){a{color:red}}@supports(display:grid)and (display:flex){a{color:red}}@supports(display:grid)or (display:flex){a{color:red}}@supports(display:flex){a{color:red}}@supports(not (display:grid)){div{float:right}}@supports(transform-origin:5%5%){div{float:right}}@supports(display:grid)and (not (display... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/add-sub/input.css | CSS | .class1 {
width: calc(100% - 10px + 20px);
}
.class2 {
width: calc(100% + 10px - 20px);
}
.class3 {
width: calc(1px - (2em + 3%));
}
.class4 {
width: calc((100vw - 50em) / 2);
}
.class5 {
width: calc(10px - (100vw - 50em) / 2);
}
.class6 {
width: calc(1px - (2em + 4vh + 3%));
}
.class7 {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/add-sub/output.min.css | CSS | .class1{width:calc(100% + 10px)}.class2{width:calc(100% - 10px)}.class3{width:calc(1px - 3% - 2em)}.class4{width:calc(50vw - 25em)}.class5{width:calc(25em + 10px - 50vw)}.class6{width:calc(1px - 3% - 2em - 4vh)}.class7{width:calc(-24px + .5*(var(--a) - var(--b)) - var(--c))}.class8{width:calc(2em + 5px + 3vh)}.class9{w... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/constant/input.css | CSS | .class1 {
line-height: calc(e);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/constant/output.min.css | CSS | .class1{line-height:calc(e)}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/container-condition/input.css | CSS | @container (inline-size >= calc(100px + 100px)) {
/* only applies when an inline-size container is available */
h2 { font-size: calc(1.2em + 1cqi); }
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/container-condition/output.min.css | CSS | @container(inline-size>=200px){h2{font-size:calc(1cqi + 1.2em)}}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/container/input.css | CSS | @container (inline-size >= 0px) {
h2 { font-size: calc(1cqw + 1cqw); }
}
@container (inline-size >= 0px) {
h2 { font-size: calc(1cqh + 1cqh); }
}
@container (inline-size >= 0px) {
h2 { font-size: calc(1cqi + 1cqi); }
}
@container (inline-size >= 0px) {
h2 { font-size: calc(1cqb + 1cqb); }
}
@contain... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/container/output.min.css | CSS | @container(inline-size>=0){h2{font-size:2cqw;font-size:2cqh;font-size:2cqi;font-size:2cqb;font-size:2cqmin;font-size:2cqmax}}@container(inline-size>=200px){h2{font-size:2cqw}}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/convert-units/input.css | CSS | .class1 {
width: calc(1cm + 1px);
}
.class2 {
width: calc(1px + 1cm);
}
.class3 {
width: calc(10Q + 10Q);
}
.class4 {
width: calc(100.9q + 10px);
}
.class5 {
width: calc(10px + 100.9q);
}
.class6 {
width: calc(10cm + 1px);
}
.class7 {
width: calc(10mm + 1px);
}
.class8 {
width: ca... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/convert-units/output.min.css | CSS | .class1,.class2{width:calc(1cm + 1px)}.class3{width:20q}.class4,.class5{width:calc(10px + 100.9q)}.class6{width:calc(10cm + 1px)}.class7{width:calc(1cm + 1px)}.class8{width:calc(10px + 1q)}.class9{width:401q}.class10{width:41q}.class11{width:calc(10in + 1q)}.class12{width:calc(10pt + 1q)}.class13{width:calc(10pc + 1q)}... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/css-variables/input.css | CSS | .class1 {
width: calc(var(--mouseX) * 1px);
}
.class2 {
width: calc(10px - (100px * var(--mouseX)));
}
.class3 {
width: calc(10px - (100px + var(--mouseX)));
}
.class4 {
width: calc(10px - (100px / var(--mouseX)));
}
.class5 {
width: calc(10px - (100px - var(--mouseX)));
}
.class6 {
width: ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/css-variables/output.min.css | CSS | .class1{width:calc(1px*var(--mouseX))}.class2{width:calc(10px - 100px*var(--mouseX))}.class3{width:calc(-90px - var(--mouseX))}.class4{width:calc(10px - 100px/var(--mouseX))}.class5{width:calc(-90px + var(--mouseX))}.class6{width:calc(.5*var(--popupHeight))}.class7{width:calc(.5*var(--popupHeight) + .5*var(--popupWidth... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/discard-zero/input.css | CSS | .class1 {
width: calc(100vw / 2 - 6px + 0px);
}
.class2 {
width: calc(500px - 0px);
}
.class3 {
width: calc( 0 - 10px);
}
.class4 {
width: calc( 0 - calc(1px + 1em) );
}
.class5 {
width: calc( 0 - (100vw - 10px) / 2 );
}
.class6 {
width: calc( 0px - (100vw - 10px));
}
.class7 {
width: ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/discard-zero/output.min.css | CSS | .class1{width:calc(50vw - 6px)}.class2{width:500px}.class3{width:calc(0 - 10px)}.class4{width:calc(0 - 1em - 1px)}.class5{width:calc(0 + 5px - 50vw)}.class6{width:calc(10px - 100vw)}.class7{width:calc(20px - 200vw)}.class8{width:calc(-10px - 100vw)}.class9{width:calc(0px - .5*var(--foo,4px))}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/divide/input.css | CSS | .class1 {
width: calc(((var(--a) + 4px) / 2) / 2);
}
.class2 {
width: calc(((var(--a) + 4px) / 2) / 2 + 4px);
}
.class3 {
width: calc(100% / (var(--aspect-ratio)));
}
.class4 {
width: calc(
(var(--fluid-screen) - ((var(--fluid-min-width) / 16) * 1rem)) /
((var(--fluid-max-widt... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/divide/output.min.css | CSS | .class1{width:calc(.25*(4px + var(--a)))}.class2{width:calc(4px + .25*(4px + var(--a)))}.class3{width:calc(100%/var(--aspect-ratio))}.class4{width:calc((var(--fluid-screen) - .0625rem*var(--fluid-min-width))/(.0625*var(--fluid-max-width) - .0625*var(--fluid-min-width)))}.class5{width:calc(.1*var(--dot-size))}.class6{wi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/ignore-selectors/input.css | CSS | div[data-size="calc(3*3)"] {
color: red;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/ignore-selectors/output.min.css | CSS | div[data-size="calc(3*3)"]{color:red}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/ignore-surrounding-value/input.css | CSS | .class1 {
width: a calc(1px + 1px);
}
.class2 {
width: calc(1px + 1px) a;
}
.class3 {
width: a calc(1px + 1px) b;
}
.class4 {
width: a calc(1px + 1px) b calc(1em + 2em) c;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/ignore-surrounding-value/output.min.css | CSS | .class1{width:a 2px}.class2{width:2px a}.class3{width:a 2px b}.class4{width:a 2px b 3em c}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/import/input.css | CSS | @import url("narrow.css") supports(display: flex) screen and (max-width: calc(0px));
@import url("narrow.css") supports(display: flex) screen and (max-width: calc(100px * 0));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/import/output.min.css | CSS | @import"narrow.css"supports(display:flex)screen and (max-width:0);@import"narrow.css"supports(display:flex)screen and (max-width:0);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/media-query/input.css | CSS | @media (min-width: calc(10px + 10px)) {
.class1 {
color: red;
}
}
@media (min-width: calc(calc(10px + 10px))) {
.class1 {
color: red;
}
}
@media (color: calc(0 + 1)) {
.class1 {
color: red;
}
}
@media (min-width: calc(10px * 0)) {
.class1 {
color: red;
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/media-query/output.min.css | CSS | @media(min-width:20px){.class1{color:red}}@media(color:1){.class1{color:red}}@media(min-width:0){.class1{color:red}}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/multiply/input.css | CSS | .class1 {
width: calc(((var(--a) + 4px) * 2) * 2);
}
.class2 {
width: calc(((var(--a) + 4px) * 2) * 2 + 4px);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/multiply/output.min.css | CSS | .class1{width:calc(4*(4px + var(--a)))}.class2{width:calc(4px + 4*(4px + var(--a)))}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/nested-calc/input.css | CSS | .class1 {
width: calc(100% - calc(50% + 25px));
}
.class2 {
width: CALC(1px + CALC(2px / 2));
}
.class3 {
width: calc( (1em - calc( 10px + 1em)) / 2);
}
.class4 {
width: calc(calc(2.25rem + 2px) - 1px * 2);
}
.class5 {
width: calc(100vh - 5rem - calc(10rem + 100px));
}
.class6 {
width: calc... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/nested-calc/output.min.css | CSS | .class1{width:calc(50% - 25px)}.class2{width:2px}.class3{width:calc(0em - 5px)}.class4{width:calc(0px + 2.25rem)}.class5{width:calc(100vh - 100px - 15rem)}.class6{width:calc(100% - 10px - 2vw)}.class7{width:calc(100% - 10px + 2vw)}.class8{width:300px}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/precision/input.css | CSS | .class1 {
width: calc(1/100);
}
.class2 {
width: calc(5/1000000);
}
.class3 {
width: calc(100% / 3 * 3);
}
.class4 {
width: calc(calc(100% / 3) * 3);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/precision/output.min.css | CSS | .class1{width:.01}.class2{width:calc(5*1e-6)}.class3,.class4{width:100%}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/simple-calc/input.css | CSS | .class1 {
width: calc(1px + 1px);
}
.class2 {
width: calc(1px + 1px);
height: calc(2px + 3px);
}
.class3 {
width: calc(1rem * 1.5);
}
.class4 {
width: calc(3em - 1em);
}
.class5 {
width: calc(2ex / 2);
}
.class6 {
width: calc(50px - (20px - 30px));
}
.class7 {
width: calc(100px - (... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/simple-calc/output.min.css | CSS | .class1{width:2px}.class2{width:2px;height:5px}.class3{width:1.5rem}.class4{width:2em}.class5{width:1ex}.class6{width:60px}.class7{width:calc(100% + 0px)}.class8{width:calc(200px - 100%)}.class9,.class10{width:2px}.class11{width:3rem}.class12{width:calc(100% + 1px)}.class13{width:calc(2rem - .14285em)}@supports(width:c... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/skip/input.css | CSS | .class1 {
width: calc(constant(safe-area-inset-left));
}
.class2 {
width: calc(env(safe-area-inset-left));
}
.class3 {
width: calc(env(safe-area-inset-left, 50px 20px));
}
.class4 {
width: calc(unknown(safe-area-inset-left));
}
.class5 {
width: calc(unknown(#fff) - other-unknown(200px));
}
.cla... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/skip/output.min.css | CSS | .class1{width:constant(safe-area-inset-left)}.class2{width:env(safe-area-inset-left)}.class3{width:env(safe-area-inset-left,50px 20px)}.class4{width:unknown(safe-area-inset-left)}.class5{width:calc(unknown(#fff) - other-unknown(200px))}.class6{width:calc(unknown(#fff)*other-unknown(200px))}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/supports-condition/input.css | CSS | @supports (width: calc(100px + 100px)) {
div {
background: red;
}
}
@supports (width: calc(calc(100px + 100px))) {
div {
background: red;
}
}
@supports (width: calc(0px * 100)) {
div {
background: red;
}
}
@supports (width: calc(0px + 0px)) {
div {
backgrou... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/supports-condition/output.min.css | CSS | @supports(width:calc(100px + 100px)){div{background:red}}@supports(width:calc(calc(100px + 100px))){div{background:red}}@supports(width:calc(0px*100)){div{background:red}}@supports(width:calc(0px + 0px)){div{background:red}}@supports(width:calc(100px*sqrt(9))){div{background:red}}@supports(width:calc(100px)){div{backgr... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/units/input.css | CSS | .class1 {
width: calc(1px + 1);
}
.class2 {
width: calc(100% - 120px - 60px);
}
.class3 {
width: calc(100% - 10px - 20px);
}
.class4 {
width: calc(1s - 50ms);
}
.class5 {
width: calc(99.99% * 1/1 - 0rem);
}
.class6 {
width: calc(50% + (5em + 5%));
}
.class7 {
width: calc((100px - 1em) ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-calc/units/output.min.css | CSS | .class1{width:calc(1 + 1px)}.class2{width:calc(100% - 180px)}.class3{width:calc(100% - 30px)}.class4{width:950ms}.class5{width:calc(99.99% - 0rem)}.class6{width:calc(55% + 5em)}.class7{width:calc(0em + 50px)}.class8{width:0}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-color/input.css | CSS | .color {
color: rgb(from transparent 255 255 255);
}
.color-1 {
color: rgb(from red 255 255 255);
}
.color-2 {
color: rgb(from #ff0000 255 255 255);
}
.color-3 {
color: rgb(from #f00 255 255 255);
}
.color-4 {
color: rgb(from palegoldenrod 255 255 255);
}
.color-5 {
color: rgb(from #ff0 255... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_css_minifier/tests/fixture/compress-color/output.min.css | CSS | .color{color:rgb(from rgba(0,0,0,0)255 255 255)}.color-1,.color-2{color:rgb(from red 255 255 255)}.color-3{color:rgb(from#f00 255 255 255)}.color-4{color:rgb(from#eee8aa 255 255 255)}.color-5{color:rgb(from#ff0 255 255 255)}.color-6{color:rgb(from snow 255 255 255)}.color-7{color:rgba(123,123,123,0)}.color-8,.color-9,.... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.