Add ImportDirective type pairing @import URLs with parsed media queries, enabling viewport-based filtering during import resolution so that e.g. `@import "print.css" print` is skipped on screen. Thread Viewport through the resolve_imports pipeline, strip CSS Cascade 5 layer/supports annotations before media parsing, and add golden tests for @media screen/print behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
262 B
HTML
21 lines
262 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.box {
|
|
width: 100px;
|
|
height: 50px;
|
|
background-color: green;
|
|
}
|
|
@media print {
|
|
.box {
|
|
background-color: red;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="box">Print ignored</div>
|
|
</body>
|
|
</html>
|