feat(web): C3 style cell strict checks and head defer/version
Warn or reject numeric CSS values from bare `/` division; support script defer/async/version and page/app asset_version for cache busting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
824b9bf607
commit
7670673a39
11 files changed
+426
-52
No files matched your search
+122
-5
@@ -15,6 +15,11 @@ pub struct HeadLink {
|
||||
pub media: String,
|
||||
pub as_: String,
|
||||
pub crossorigin: String,
|
||||
/// When `Some(true)`, emit `defer` on classic scripts (not modules).
|
||||
pub defer: Option<bool>,
|
||||
pub async_: bool,
|
||||
/// Query `?v=` bump for cache busting.
|
||||
pub version: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -38,6 +43,37 @@ fn pick<'a>(m: &'a Map<String, Value>, keys: &[&str]) -> Option<&'a Value> {
|
||||
keys.iter().find_map(|k| m.get(*k))
|
||||
}
|
||||
|
||||
fn cell_boolish(v: &Value) -> Option<bool> {
|
||||
match v {
|
||||
Value::Bool(b) => Some(*b),
|
||||
Value::Number(n) => Some(n.as_i64().unwrap_or(0) != 0),
|
||||
Value::String(s) => {
|
||||
let s = s.trim();
|
||||
if s.is_empty() {
|
||||
return None;
|
||||
}
|
||||
if matches!(
|
||||
s,
|
||||
"1" | "true" | "True" | "yes" | "on" | "真" | "是"
|
||||
) {
|
||||
Some(true)
|
||||
} else if matches!(
|
||||
s,
|
||||
"0" | "false" | "False" | "no" | "off" | "假" | "否"
|
||||
) {
|
||||
Some(false)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn row_bool(m: &Map<String, Value>, keys: &[&str]) -> Option<bool> {
|
||||
pick(m, keys).and_then(cell_boolish)
|
||||
}
|
||||
|
||||
fn row_str(m: &Map<String, Value>, keys: &[&str]) -> String {
|
||||
pick(m, keys)
|
||||
.map(|v| normalize_ref(&cell_str(v)))
|
||||
@@ -46,6 +82,19 @@ fn row_str(m: &Map<String, Value>, keys: &[&str]) -> String {
|
||||
.to_string()
|
||||
}
|
||||
|
||||
/// Append `?v=` / `&v=` for cache busting.
|
||||
pub fn href_with_version(href: &str, version: &str) -> String {
|
||||
let version = version.trim();
|
||||
if version.is_empty() {
|
||||
return href.to_string();
|
||||
}
|
||||
if href.contains('?') {
|
||||
format!("{href}&v={version}")
|
||||
} else {
|
||||
format!("{href}?v={version}")
|
||||
}
|
||||
}
|
||||
|
||||
fn esc(s: &str) -> String {
|
||||
s.replace('&', "&")
|
||||
.replace('<', "<")
|
||||
@@ -142,6 +191,9 @@ pub fn as_head_links(table: &Value) -> Vec<HeadLink> {
|
||||
media: row_str(&m, &["媒体", "media", "Media"]),
|
||||
as_: row_str(&m, &["作为", "as", "As"]),
|
||||
crossorigin: row_str(&m, &["跨域", "crossorigin", "crossOrigin"]),
|
||||
defer: row_bool(&m, &["推迟", "defer", "Defer"]),
|
||||
async_: row_bool(&m, &["异步", "async", "Async"]).unwrap_or(false),
|
||||
version: row_str(&m, &["版本", "version", "Version", "v"]),
|
||||
});
|
||||
}
|
||||
out
|
||||
@@ -152,7 +204,7 @@ pub fn head_links_to_json(links: &[HeadLink]) -> Value {
|
||||
links
|
||||
.iter()
|
||||
.map(|l| {
|
||||
json!({
|
||||
let mut o = json!({
|
||||
"rel": l.rel,
|
||||
"href": l.href,
|
||||
"type": l.type_,
|
||||
@@ -160,7 +212,15 @@ pub fn head_links_to_json(links: &[HeadLink]) -> Value {
|
||||
"media": l.media,
|
||||
"as": l.as_,
|
||||
"crossorigin": l.crossorigin,
|
||||
})
|
||||
"async": l.async_,
|
||||
"version": l.version,
|
||||
});
|
||||
if let Some(d) = l.defer {
|
||||
o.as_object_mut()
|
||||
.unwrap()
|
||||
.insert("defer".into(), json!(d));
|
||||
}
|
||||
o
|
||||
})
|
||||
.collect(),
|
||||
)
|
||||
@@ -187,6 +247,9 @@ pub fn head_links_from_json(v: &Value) -> Vec<HeadLink> {
|
||||
media: row_str(m, &["media", "媒体"]),
|
||||
as_: row_str(m, &["as", "作为"]),
|
||||
crossorigin: row_str(m, &["crossorigin", "跨域"]),
|
||||
defer: row_bool(m, &["defer", "推迟"]),
|
||||
async_: row_bool(m, &["async", "异步"]).unwrap_or(false),
|
||||
version: row_str(m, &["version", "版本", "v"]),
|
||||
});
|
||||
}
|
||||
out
|
||||
@@ -194,24 +257,42 @@ pub fn head_links_from_json(v: &Value) -> Vec<HeadLink> {
|
||||
|
||||
/// Render HeadLink list to HTML (link / script tags).
|
||||
pub fn render_head_links(links: &[HeadLink]) -> String {
|
||||
render_head_links_with_version(links, "")
|
||||
}
|
||||
|
||||
pub fn render_head_links_with_version(links: &[HeadLink], asset_version: &str) -> String {
|
||||
let mut s = String::new();
|
||||
for l in links {
|
||||
let rel = l.rel.trim().to_ascii_lowercase();
|
||||
let ver = if !l.version.trim().is_empty() {
|
||||
l.version.as_str()
|
||||
} else {
|
||||
asset_version
|
||||
};
|
||||
let href = href_with_version(&l.href, ver);
|
||||
if rel == "script" || rel == "module" {
|
||||
let mut tag = String::from("<script");
|
||||
if rel == "module" || l.type_ == "module" {
|
||||
let is_module = rel == "module" || l.type_ == "module";
|
||||
if is_module {
|
||||
tag.push_str(" type=\"module\"");
|
||||
} else if !l.type_.is_empty() {
|
||||
tag.push_str(&format!(" type=\"{}\"", esc(&l.type_)));
|
||||
}
|
||||
// Modules are deferred by browsers; classic scripts honor explicit defer.
|
||||
if !is_module && l.defer == Some(true) {
|
||||
tag.push_str(" defer");
|
||||
}
|
||||
if l.async_ {
|
||||
tag.push_str(" async");
|
||||
}
|
||||
if !l.crossorigin.is_empty() {
|
||||
tag.push_str(&format!(" crossorigin=\"{}\"", esc(&l.crossorigin)));
|
||||
}
|
||||
tag.push_str(&format!(" src=\"{}\"></script>", esc(&l.href)));
|
||||
tag.push_str(&format!(" src=\"{}\"></script>", esc(&href)));
|
||||
s.push_str(&tag);
|
||||
continue;
|
||||
}
|
||||
let mut tag = format!("<link rel=\"{}\" href=\"{}\"", esc(&l.rel), esc(&l.href));
|
||||
let mut tag = format!("<link rel=\"{}\" href=\"{}\"", esc(&l.rel), esc(&href));
|
||||
if !l.type_.is_empty() {
|
||||
tag.push_str(&format!(" type=\"{}\"", esc(&l.type_)));
|
||||
}
|
||||
@@ -295,6 +376,9 @@ pub fn normalize_icons(table: &Value) -> (Value, Vec<HeadLink>, Vec<IconRoute>)
|
||||
media: String::new(),
|
||||
as_: String::new(),
|
||||
crossorigin: String::new(),
|
||||
defer: None,
|
||||
async_: false,
|
||||
version: String::new(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -347,6 +431,9 @@ pub fn normalize_icons(table: &Value) -> (Value, Vec<HeadLink>, Vec<IconRoute>)
|
||||
media: String::new(),
|
||||
as_: String::new(),
|
||||
crossorigin: String::new(),
|
||||
defer: None,
|
||||
async_: false,
|
||||
version: String::new(),
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -369,6 +456,9 @@ pub fn convention_favicon(static_dir: &Path) -> Option<(Vec<HeadLink>, Vec<IconR
|
||||
media: String::new(),
|
||||
as_: String::new(),
|
||||
crossorigin: String::new(),
|
||||
defer: None,
|
||||
async_: false,
|
||||
version: String::new(),
|
||||
}];
|
||||
let routes = vec![IconRoute {
|
||||
url: "/favicon.ico".into(),
|
||||
@@ -486,5 +576,32 @@ mod tests {
|
||||
let h = make_head_html(&t);
|
||||
assert!(h.contains("rel=\"icon\""));
|
||||
assert!(h.contains("<script src=\"/static/a.js\"></script>"));
|
||||
assert!(!h.contains(" defer"), "{h}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn head_script_defer_async_version() {
|
||||
let t = json!([
|
||||
{"关系": "script", "地址": "/static/a.js", "推迟": true, "版本": "3"},
|
||||
{"关系": "module", "地址": "/static/b.js", "版本": "9"},
|
||||
{"关系": "stylesheet", "地址": "/static/t.css", "版本": "1"},
|
||||
]);
|
||||
let h = make_head_html(&t);
|
||||
assert!(h.contains("<script defer src=\"/static/a.js?v=3\"></script>"), "{h}");
|
||||
assert!(h.contains("type=\"module\""), "{h}");
|
||||
assert!(h.contains("src=\"/static/b.js?v=9\""), "{h}");
|
||||
assert!(h.contains("href=\"/static/t.css?v=1\""), "{h}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn head_asset_version_fallback() {
|
||||
let links = as_head_links(&json!([
|
||||
{"关系": "script", "地址": "/static/a.js", "推迟": "真"},
|
||||
]));
|
||||
let h = render_head_links_with_version(&links, "2026-09-04");
|
||||
assert!(
|
||||
h.contains("<script defer src=\"/static/a.js?v=2026-09-04\"></script>"),
|
||||
"{h}"
|
||||
);
|
||||
}
|
||||
}
|
||||
+59
-8
@@ -22,7 +22,7 @@ mod upload;
|
||||
mod ws;
|
||||
mod ws_hub;
|
||||
|
||||
use crate::table::as_css_named;
|
||||
use crate::table::as_css_named_checked;
|
||||
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::os::raw::{c_char, c_int, c_void};
|
||||
@@ -283,6 +283,13 @@ web_ffi!(web_page_new, |args: &Value| {
|
||||
if let Some(s) = arg_str_opt(args, "layout").or_else(|| arg_str_opt(args, "布局")) {
|
||||
out.as_object_mut().unwrap().insert("layout".into(), json!(s));
|
||||
}
|
||||
if let Some(s) = arg_str_opt(args, "asset_version")
|
||||
.or_else(|| arg_str_opt(args, "资源版本"))
|
||||
{
|
||||
out.as_object_mut()
|
||||
.unwrap()
|
||||
.insert("asset_version".into(), json!(s));
|
||||
}
|
||||
Ok(out)
|
||||
});
|
||||
|
||||
@@ -355,7 +362,21 @@ web_ffi!(web_page_css, |args: &Value| {
|
||||
web_ffi!(web_style, |args: &Value| {
|
||||
let name = arg_str_opt(args, "name").unwrap_or("").to_string();
|
||||
let table = args.get("table").cloned().unwrap_or(json!([]));
|
||||
Ok(Value::String(as_css_named(&name, &table)))
|
||||
let strict = args
|
||||
.get("strict")
|
||||
.or_else(|| args.get("strict_css_cells"))
|
||||
.or_else(|| args.get("严格"))
|
||||
.map(|v| match v {
|
||||
Value::Bool(b) => *b,
|
||||
Value::Number(n) => n.as_i64().unwrap_or(0) != 0,
|
||||
Value::String(s) => matches!(
|
||||
s.trim(),
|
||||
"1" | "true" | "True" | "yes" | "on" | "真" | "是"
|
||||
),
|
||||
_ => false,
|
||||
})
|
||||
.unwrap_or(false);
|
||||
as_css_named_checked(&name, &table, strict).map(Value::String)
|
||||
});
|
||||
|
||||
web_ffi!(web_page_detail, |args: &Value| {
|
||||
@@ -1066,6 +1087,13 @@ web_ffi!(web_app_new, |args: &Value| {
|
||||
if let Some(s) = arg_str_opt(args, "layout").or_else(|| arg_str_opt(args, "布局")) {
|
||||
out.as_object_mut().unwrap().insert("layout".into(), json!(s));
|
||||
}
|
||||
if let Some(s) = arg_str_opt(args, "asset_version")
|
||||
.or_else(|| arg_str_opt(args, "资源版本"))
|
||||
{
|
||||
out.as_object_mut()
|
||||
.unwrap()
|
||||
.insert("asset_version".into(), json!(s));
|
||||
}
|
||||
Ok(out)
|
||||
});
|
||||
|
||||
@@ -1642,7 +1670,12 @@ web_ffi!(web_db_table_info, |args: &Value| {
|
||||
});
|
||||
|
||||
|
||||
fn stamp_page_shell(page: &mut Value, shell_css: Option<&str>, layout: Option<&str>) {
|
||||
fn stamp_page_shell(
|
||||
page: &mut Value,
|
||||
shell_css: Option<&str>,
|
||||
layout: Option<&str>,
|
||||
asset_version: Option<&str>,
|
||||
) {
|
||||
let Some(obj) = page.as_object_mut() else {
|
||||
return;
|
||||
};
|
||||
@@ -1666,6 +1699,16 @@ fn stamp_page_shell(page: &mut Value, shell_css: Option<&str>, layout: Option<&s
|
||||
obj.insert("layout".into(), json!(s));
|
||||
}
|
||||
}
|
||||
if let Some(s) = asset_version {
|
||||
let empty = obj
|
||||
.get("asset_version")
|
||||
.and_then(|v| v.as_str())
|
||||
.unwrap_or("")
|
||||
.is_empty();
|
||||
if empty {
|
||||
obj.insert("asset_version".into(), json!(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
web_ffi!(web_listen, |args: &Value| {
|
||||
@@ -2057,11 +2100,15 @@ web_ffi!(web_listen, |args: &Value| {
|
||||
.get("layout")
|
||||
.or_else(|| admin_cfg_app.get("布局"))
|
||||
.and_then(|v| v.as_str());
|
||||
let app_asset_version = admin_cfg_app
|
||||
.get("asset_version")
|
||||
.or_else(|| admin_cfg_app.get("资源版本"))
|
||||
.and_then(|v| v.as_str());
|
||||
let mut page = page;
|
||||
let mut routes = routes;
|
||||
stamp_page_shell(&mut page, app_shell, app_layout);
|
||||
stamp_page_shell(&mut page, app_shell, app_layout, app_asset_version);
|
||||
for (_k, p) in routes.iter_mut() {
|
||||
stamp_page_shell(p, app_shell, app_layout);
|
||||
stamp_page_shell(p, app_shell, app_layout, app_asset_version);
|
||||
}
|
||||
http::listen(
|
||||
&page,
|
||||
@@ -2130,7 +2177,11 @@ pub unsafe extern "C" fn marqdo_plugin_init(host: *const MarqdoHostApi) -> c_int
|
||||
}
|
||||
|
||||
let regs = [
|
||||
("web_page_new", "title,intro,shell_css,layout", web_page_new as PluginFn),
|
||||
(
|
||||
"web_page_new",
|
||||
"title,intro,shell_css,layout,asset_version",
|
||||
web_page_new as PluginFn,
|
||||
),
|
||||
(
|
||||
"web_compose_components",
|
||||
"page,components",
|
||||
@@ -2239,7 +2290,7 @@ pub unsafe extern "C" fn marqdo_plugin_init(host: *const MarqdoHostApi) -> c_int
|
||||
("web_media_new", "storage", web_media_new as PluginFn),
|
||||
(
|
||||
"web_style",
|
||||
"name,table",
|
||||
"name,table,strict",
|
||||
web_style as PluginFn,
|
||||
),
|
||||
(
|
||||
@@ -2302,7 +2353,7 @@ pub unsafe extern "C" fn marqdo_plugin_init(host: *const MarqdoHostApi) -> c_int
|
||||
("web_db_list_tables", "url", web_db_list_tables as PluginFn),
|
||||
(
|
||||
"web_app_new",
|
||||
"page,db,admin,host,port,admin_prefix,login_redirect,logout_redirect,shell_css,layout",
|
||||
"page,db,admin,host,port,admin_prefix,login_redirect,logout_redirect,shell_css,layout,asset_version",
|
||||
web_app_new as PluginFn,
|
||||
),
|
||||
("web_app_route", "app,path,page", web_app_route as PluginFn),
|
||||
|
||||
@@ -469,7 +469,15 @@ fn head_html(args: &Value, default_title: &str) -> String {
|
||||
}
|
||||
if let Some(head) = args.get("head") {
|
||||
let links = crate::assets::head_links_from_json(head);
|
||||
s.push_str(&crate::assets::render_head_links(&links));
|
||||
let asset_version = args
|
||||
.get("asset_version")
|
||||
.or_else(|| args.get("资源版本"))
|
||||
.and_then(|v| v.as_str())
|
||||
.unwrap_or("");
|
||||
s.push_str(&crate::assets::render_head_links_with_version(
|
||||
&links,
|
||||
asset_version,
|
||||
));
|
||||
}
|
||||
s
|
||||
}
|
||||
|
||||
+93
-17
@@ -335,20 +335,30 @@ pub fn normalize_slot(name: &str) -> String {
|
||||
/// | @keyframes pulse from | opacity | 0 |
|
||||
/// ```
|
||||
pub fn as_css_named(name: &str, table: &Value) -> String {
|
||||
as_css_named_checked(name, table, false).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Like [`as_css_named`], but when `strict` is true, reject cells that look like
|
||||
/// T5 evaluated a bare `/` (numeric/bool CSS values). Default mode warns on stderr.
|
||||
pub fn as_css_named_checked(name: &str, table: &Value, strict: bool) -> Result<String, String> {
|
||||
let name = normalize_ref(name);
|
||||
if name.is_empty() {
|
||||
return String::new();
|
||||
return Ok(String::new());
|
||||
}
|
||||
let mut out = String::new();
|
||||
match table {
|
||||
Value::Object(m) => {
|
||||
let sels = pick(m, SEL_KEYS).map(as_str_list).unwrap_or_default();
|
||||
let props = pick(m, PROP_KEYS).map(as_str_list).unwrap_or_default();
|
||||
let vals = pick(m, VAL_KEYS).map(as_str_list).unwrap_or_default();
|
||||
let vals_raw = pick(m, VAL_KEYS);
|
||||
let vals = vals_raw.map(as_str_list).unwrap_or_default();
|
||||
let medias = pick(m, MEDIA_KEYS).map(as_str_list).unwrap_or_default();
|
||||
let n = props.len().max(sels.len()).max(vals.len());
|
||||
if n == 0 {
|
||||
return String::new();
|
||||
return Ok(String::new());
|
||||
}
|
||||
if let Some(raw) = vals_raw {
|
||||
check_css_value_cells(raw, &props, strict)?;
|
||||
}
|
||||
let rows: Vec<(String, String, String, String)> = (0..n)
|
||||
.map(|i| {
|
||||
@@ -363,23 +373,68 @@ pub fn as_css_named(name: &str, table: &Value) -> String {
|
||||
emit_css_rows(&rows, &name, &mut out);
|
||||
}
|
||||
Value::Array(rows) => {
|
||||
let rows: Vec<(String, String, String, String)> = rows
|
||||
.iter()
|
||||
.filter_map(|row| {
|
||||
let m = row.as_object()?;
|
||||
Some((
|
||||
pick(m, MEDIA_KEYS).map(cell_str).unwrap_or_default(),
|
||||
pick(m, SEL_KEYS).map(cell_str).unwrap_or_default(),
|
||||
pick(m, PROP_KEYS).map(cell_str).unwrap_or_default(),
|
||||
pick(m, VAL_KEYS).map(cell_str).unwrap_or_default(),
|
||||
))
|
||||
})
|
||||
.collect();
|
||||
emit_css_rows(&rows, &name, &mut out);
|
||||
let mut collected = Vec::new();
|
||||
for row in rows {
|
||||
let Some(m) = row.as_object() else {
|
||||
continue;
|
||||
};
|
||||
let prop = pick(m, PROP_KEYS).map(cell_str).unwrap_or_default();
|
||||
if let Some(v) = pick(m, VAL_KEYS) {
|
||||
note_css_value_cell(&prop, v, strict)?;
|
||||
}
|
||||
collected.push((
|
||||
pick(m, MEDIA_KEYS).map(cell_str).unwrap_or_default(),
|
||||
pick(m, SEL_KEYS).map(cell_str).unwrap_or_default(),
|
||||
prop,
|
||||
pick(m, VAL_KEYS).map(cell_str).unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
emit_css_rows(&collected, &name, &mut out);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
out
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
fn css_value_suspicious(v: &Value) -> Option<&'static str> {
|
||||
match v {
|
||||
Value::Number(_) => Some(
|
||||
"numeric CSS value (likely bare `/` division such as `1 / 5`; quote the cell, e.g. `\"1 / 5\"`)",
|
||||
),
|
||||
Value::Bool(_) => Some("boolean CSS value (quote the cell if intentional)"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn note_css_value_cell(prop: &str, val: &Value, strict: bool) -> Result<(), String> {
|
||||
let Some(why) = css_value_suspicious(val) else {
|
||||
return Ok(());
|
||||
};
|
||||
let prop = if prop.trim().is_empty() {
|
||||
"(value)"
|
||||
} else {
|
||||
prop.trim()
|
||||
};
|
||||
let msg = format!("ext/web style: suspicious cell for `{prop}`: {why}");
|
||||
if strict {
|
||||
Err(msg)
|
||||
} else {
|
||||
eprintln!("warning: {msg}");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn check_css_value_cells(vals: &Value, props: &[String], strict: bool) -> Result<(), String> {
|
||||
match vals {
|
||||
Value::Array(a) => {
|
||||
for (i, v) in a.iter().enumerate() {
|
||||
let prop = props.get(i).map(|s| s.as_str()).unwrap_or("");
|
||||
note_css_value_cell(prop, v, strict)?;
|
||||
}
|
||||
}
|
||||
other => note_css_value_cell(props.first().map(|s| s.as_str()).unwrap_or(""), other, strict)?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Parse `@keyframes name` or `@keyframes name stop` from a selector cell.
|
||||
@@ -742,4 +797,25 @@ mod css_tests {
|
||||
assert!(css.contains(".x {"), "{css}");
|
||||
assert!(css.contains("color: red;"), "{css}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strict_rejects_numeric_css_value() {
|
||||
let t = json!([
|
||||
{"选择器": ".x", "属性": "grid-column", "值": 0},
|
||||
]);
|
||||
let err = as_css_named_checked("x", &t, true).unwrap_err();
|
||||
assert!(err.contains("suspicious"), "{err}");
|
||||
// Non-strict still emits (with warning on stderr).
|
||||
let css = as_css_named_checked("x", &t, false).unwrap();
|
||||
assert!(css.contains("grid-column: 0;"), "{css}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn quoted_string_ok_in_strict() {
|
||||
let t = json!([
|
||||
{"选择器": ".x", "属性": "grid-column", "值": "1 / 5"},
|
||||
]);
|
||||
let css = as_css_named_checked("x", &t, true).unwrap();
|
||||
assert!(css.contains("grid-column: 1 / 5;"), "{css}");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user