Blue Sky CSS
Blue Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.cssb21610d64e082151dc6ed6e7fd77450273ea197fb932a44e482c672a2da94104Web
Webページの見た目を定義するスタイルシート。固定のバイナリシグネチャはありません。
3A 72 6F 6F 74 :rootSIGNATURE = bytes.fromhex("3a726f6f74")
OFFSET = 0
def is_css(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x3a, 0x72, 0x6f, 0x6f, 0x74];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isCss(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var iscssSignature = []byte{0x3a, 0x72, 0x6f, 0x6f, 0x74}
const iscssOffset = 0
func IsCss(b []byte) bool {
end := iscssOffset + len(iscssSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[iscssOffset:end], iscssSignature)
}const SIGNATURE: &[u8] = &[0x3a, 0x72, 0x6f, 0x6f, 0x74];
const OFFSET: usize = 0;
fn is_css(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x3a\x72\x6f\x6f\x74";
$offset = 0;
function is_css(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}Cascading Style Sheets はデータ交換、インポート/エクスポート、パーサのテスト、検証ワークフローで使われます。エンコーディング・区切り文字・バージョン・コンテナ構造が実装の挙動を変えることがあります。
形式が判定できたからといって、信頼できない入力が安全とは限りません。パーサ例外・巨大ファイル・想定外のエンコーディング・外部参照を考慮してください。
11 個のサンプルで、先頭バイト判定・パーサのエラー・アップロード上限・ダウンロード挙動をテストできます。
Blue Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.cssb21610d64e082151dc6ed6e7fd77450273ea197fb932a44e482c672a2da94104Flower Garden CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.css2b4049937e2555e3b406fd4044f7edf0e2c91a9cc6426dddeace122629fb8c1cNavy Blue Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.css2e8a93482737980e961e069d7f29cbaf01fc59ba6e2522eadb31c2f377c21526Nature of the Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.cssc8e6062864bb2217599509009a338f85ac5d02566748041eb62f754f51e53a98Sky Landscape CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.cssea49ce1bcb735e7455d02c353cc714dcd2e818c396f78822b369a6e12dc6aad2Starry Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.css2ad5ab74d78a3d2ad64dcadf71ce84bbb9441b725ed1567729621c02f1f0eff2Blue Night Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.cssd86e9bfcb4e2222f00bfe6f4da35ac36c71010b54c27f781e30aa010c5682182Hibiscus Flower CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.css02502ed584ef0a1ac98ddef81ca2790a25f59d0a0dce93a17f217f64822b7116Arctic Sky CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.css24134d3d61947d2d723d194ea3d15bd4fa3c833f35c4b742bb9373c5aad0915eSunset Rays CSS is a Cascading Style Sheets sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
10-sunset-rays.css0910c9d5df680cc91dffa4eb06c9c3adab01be40d5207cc27a5bcef622f27260NASA Blue Marble CSS is a Cascading Style Sheets sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.css87fbbe9ca50740d45f6bea5c1672b5c1ecb728c9291f20eb57641e07a5afc6fdCascading Style Sheets ファイルはバイトシグネチャ 3A 72 6F 6F 74 (":root") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
Cascading Style Sheets のMIMEタイプは text/css です。
Cascading Style Sheets ファイルは .css 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。