mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 21:54:36 +03:00
refactor(css/ast): Rename StyleRule
to QualifiedRule
(#2756)
This commit is contained in:
parent
e5604c3e56
commit
c50cec1533
@ -19,14 +19,14 @@ pub struct Stylesheet {
|
||||
#[ast_node]
|
||||
#[derive(Is)]
|
||||
pub enum Rule {
|
||||
#[tag("StyleRule")]
|
||||
Style(StyleRule),
|
||||
|
||||
#[tag("Tokens")]
|
||||
Invalid(Tokens),
|
||||
#[tag("QualifiedRule")]
|
||||
QualifiedRule(QualifiedRule),
|
||||
|
||||
#[tag("*")]
|
||||
AtRule(AtRule),
|
||||
|
||||
#[tag("Tokens")]
|
||||
Invalid(Tokens),
|
||||
}
|
||||
|
||||
#[ast_node]
|
||||
|
@ -1,10 +1,10 @@
|
||||
use crate::{Ident, SelectorList, Tokens, Value};
|
||||
use swc_common::{ast_node, Span};
|
||||
|
||||
#[ast_node("StyleRule")]
|
||||
pub struct StyleRule {
|
||||
#[ast_node("QualifiedRule")]
|
||||
pub struct QualifiedRule {
|
||||
pub span: Span,
|
||||
pub selectors: SelectorList,
|
||||
pub prelude: SelectorList,
|
||||
pub block: Block,
|
||||
}
|
||||
|
||||
|
@ -47,15 +47,15 @@ where
|
||||
#[emitter]
|
||||
fn emit_rule(&mut self, n: &Rule) -> Result {
|
||||
match n {
|
||||
Rule::Style(n) => emit!(self, n),
|
||||
Rule::QualifiedRule(n) => emit!(self, n),
|
||||
Rule::AtRule(n) => emit!(self, n),
|
||||
Rule::Invalid(n) => emit!(self, n),
|
||||
}
|
||||
}
|
||||
|
||||
#[emitter]
|
||||
fn emit_style_rule(&mut self, n: &StyleRule) -> Result {
|
||||
emit!(self, n.selectors);
|
||||
fn emit_qualified_rule(&mut self, n: &QualifiedRule) -> Result {
|
||||
emit!(self, n.prelude);
|
||||
space!(self);
|
||||
emit!(self, n.block);
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ where
|
||||
let start_pos = self.input.cur_span()?.lo;
|
||||
let start_state = self.input.state();
|
||||
|
||||
let selectors = self.parse_selectors();
|
||||
let selectors = match selectors {
|
||||
let prelude = self.parse_selectors();
|
||||
let prelude = match prelude {
|
||||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
self.input.skip_ws()?;
|
||||
@ -74,9 +74,9 @@ where
|
||||
let block = self.parse_simple_block()?;
|
||||
let span = span!(self, start_pos);
|
||||
|
||||
Ok(Rule::Style(StyleRule {
|
||||
Ok(Rule::QualifiedRule(QualifiedRule {
|
||||
span,
|
||||
selectors,
|
||||
prelude,
|
||||
block,
|
||||
}))
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ impl Visit for SpanVisualizer<'_> {
|
||||
mtd!(PseudoSelector, visit_pseudo_selector);
|
||||
mtd!(Rule, visit_rule);
|
||||
mtd!(Str, visit_str);
|
||||
mtd!(StyleRule, visit_style_rule);
|
||||
mtd!(QualifiedRule, visit_qualified_rule);
|
||||
mtd!(Stylesheet, visit_stylesheet);
|
||||
mtd!(SelectorList, visit_selector_list);
|
||||
mtd!(SubclassSelector, visit_subclass_selector);
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 21,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -14,7 +14,7 @@ error: Rule
|
||||
3 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/bom/input.css:1:1
|
||||
|
|
||||
1 | / a {
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"end": 94,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 13,
|
||||
@ -105,13 +105,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 132,
|
||||
"end": 227,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 132,
|
||||
@ -234,13 +234,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 237,
|
||||
"end": 272,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 237,
|
||||
|
@ -21,7 +21,7 @@ error: Rule
|
||||
4 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/comment/input.css:1:14
|
||||
|
|
||||
1 | /* comment */a/* comment */
|
||||
@ -105,7 +105,7 @@ error: Rule
|
||||
15 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/comment/input.css:9:1
|
||||
|
|
||||
9 | / div {
|
||||
@ -217,7 +217,7 @@ error: Rule
|
||||
21 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/comment/input.css:18:1
|
||||
|
|
||||
18 | / a {
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 41,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -16,7 +16,7 @@ error: Rule
|
||||
4 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
||||
|
|
||||
1 | / a {
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 32,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -14,7 +14,7 @@ error: Rule
|
||||
3 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/delim/backslash/input.css:1:1
|
||||
|
|
||||
1 | / a {
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 131,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -22,7 +22,7 @@ error: Rule
|
||||
9 | | }
|
||||
| |_^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/dimension/basic/input.css:1:1
|
||||
|
|
||||
1 | / a {
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 20,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: #112333 }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/input.css:1:1
|
||||
|
|
||||
1 | a { color: #112333 }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | \2d {}
|
||||
| ^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-8o_H6sq86TDAHqF7YO0hg/input.css:1:1
|
||||
|
|
||||
1 | \2d {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 67,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | div::before::after::selection::first-line::first-letter {color:red}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/input.css:1:1
|
||||
|
|
||||
1 | div::before::after::selection::first-line::first-letter {color:red}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: +.10; }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/input.css:1:1
|
||||
|
|
||||
1 | a { width: +.10; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | #h\61sh {}
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-b4VODLSeaV93gwC2Ot2tw/input.css:1:1
|
||||
|
|
||||
1 | #h\61sh {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 19,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: -.10%; }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/input.css:1:1
|
||||
|
|
||||
1 | a { width: -.10%; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 45,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/input.css:1:1
|
||||
|
|
||||
1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | [*|b]{}
|
||||
| ^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/-shTP60AAG6a4mCJUpV1cQ/input.css:1:1
|
||||
|
|
||||
1 | [*|b]{}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 21,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { margin: 0 1 0 1 }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/input.css:1:1
|
||||
|
|
||||
1 | a { margin: 0 1 0 1 }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 20,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: 10p\32x }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/input.css:1:1
|
||||
|
|
||||
1 | a { value: 10p\32x }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 11,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | [b="0c"] {}
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/0Zlgi2sdsFfTrdnWOHUqeg/input.css:1:1
|
||||
|
|
||||
1 | [b="0c"] {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | #id {}
|
||||
| ^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/0qqdP6EmNqzSa3h8c8lYUQ/input.css:1:1
|
||||
|
|
||||
1 | #id {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | -\2d {}
|
||||
| ^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/0yo6flt6jo-UA8rUEFjrWA/input.css:1:1
|
||||
|
|
||||
1 | -\2d {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 9,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | div#id {}
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/10VLLYwNo7xaTisP9r9Kfg/input.css:1:1
|
||||
|
|
||||
1 | div#id {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:1
|
||||
|
|
||||
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 8,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | #-\2d {}
|
||||
| ^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/1JQzQJ1QtQJ1onUzZx7BVg/input.css:1:1
|
||||
|
|
||||
1 | #-\2d {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 20,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: id\65nt }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/input.css:1:1
|
||||
|
|
||||
1 | a { value: id\65nt }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 27,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a:after { content: 'a\b' }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/input.css:1:1
|
||||
|
|
||||
1 | a:after { content: 'a\b' }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 19,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: \66n() }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/input.css:1:1
|
||||
|
|
||||
1 | a { value: \66n() }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: #ABCD }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/input.css:1:1
|
||||
|
|
||||
1 | a { color: #ABCD }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 22,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: #ABBBCCDD }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/input.css:1:1
|
||||
|
|
||||
1 | a { color: #ABBBCCDD }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: #abcf }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/input.css:1:1
|
||||
|
|
||||
1 | a { color: #abcf }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: 0.1%; }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/input.css:1:1
|
||||
|
|
||||
1 | a { width: 0.1%; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 24,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: @\6b eyword }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/input.css:1:1
|
||||
|
|
||||
1 | a { value: @\6b eyword }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 21,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: \69 dent }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/input.css:1:1
|
||||
|
|
||||
1 | a { value: \69 dent }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 21,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: #\30hash }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/input.css:1:1
|
||||
|
|
||||
1 | a { value: #\30hash }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 17,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: 0.0; }
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/input.css:1:1
|
||||
|
|
||||
1 | a { width: 0.0; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a/**/.b {}
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/4UaOTazLwrr9gd5xkBBlnw/input.css:1:1
|
||||
|
|
||||
1 | a/**/.b {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { padding: 0 1 0px 1px }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/input.css:1:1
|
||||
|
|
||||
1 | a { padding: 0 1 0px 1px }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | div#--0 {}
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/52obp49U0CyYOskQAEoIJw/input.css:1:1
|
||||
|
|
||||
1 | div#--0 {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 19,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: 10\2cx }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/input.css:1:1
|
||||
|
|
||||
1 | a { value: 10\2cx }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | [attr="-a"] {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/54mhLGCwQMwsuiVkiTzAAQ/input.css:1:1
|
||||
|
|
||||
1 | [attr="-a"] {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: +0.1; }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/input.css:1:1
|
||||
|
|
||||
1 | a { width: +0.1; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 16,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { value: x\, }
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/input.css:1:1
|
||||
|
|
||||
1 | a { value: x\, }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a~/**/b {}
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/5nNFwUYmVb5_MMMzIvIeQg/input.css:1:1
|
||||
|
|
||||
1 | a~/**/b {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: #1234 }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/input.css:1:1
|
||||
|
|
||||
1 | a { color: #1234 }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | [attr\7e=x] {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/62BQJI-uDjHXNJ7kyL8HiA/input.css:1:1
|
||||
|
|
||||
1 | [attr\7e=x] {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 13,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | [b $= "c"] {}
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/6IWHWiWjsuGkPiPAp2KmoA/input.css:1:1
|
||||
|
|
||||
1 | [b $= "c"] {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { color: white }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/input.css:1:1
|
||||
|
|
||||
1 | a { color: white }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 17,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a { width: .0%; }
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/input.css:1:1
|
||||
|
|
||||
1 | a { width: .0%; }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a+b {}
|
||||
| ^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/6fufNZ3PA6_-pNwY-IP61Q/input.css:1:1
|
||||
|
|
||||
1 | a+b {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 29,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
@ -10,7 +10,7 @@ error: Rule
|
||||
1 | a:after { content: 'a\62 c' }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: StyleRule
|
||||
error: QualifiedRule
|
||||
--> $DIR/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/input.css:1:1
|
||||
|
|
||||
1 | a:after { content: 'a\62 c' }
|
||||
|
@ -7,13 +7,13 @@
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"type": "StyleRule",
|
||||
"type": "QualifiedRule",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"ctxt": 0
|
||||
},
|
||||
"selectors": {
|
||||
"prelude": {
|
||||
"type": "SelectorList",
|
||||
"span": {
|
||||
"start": 0,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user