← スキル一覧に戻る

css
by tirtza-weinfeld
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: css description: Modern CSS features. Use for @function, style queries, range comparisons, if(), relative colors. (project)
Modern CSS (Chrome 139+)
@function Rule
Custom functions that accept arguments and return computed values.
- Syntax:
@function --name(--param) { result: value; } - Calling:
--function-name(args)(double-dash prefix) - Default params:
--param: default-value
Patterns
- Negation: flip sign of numeric values →
examples/function-negate.css - Opacity: oklch relative color →
examples/function-opacity.css - Fluid scaling: clamp with container units →
examples/function-fluid-type.css - Responsive layout: media query branching →
examples/function-layout.css
Style Queries with Range Syntax
Compare numeric custom property values using operators.
- Operators:
>,<,>=,<= - Requirement: both sides must be same numeric type (length, percentage, angle, time)
Patterns
- Container style query:
@container style(--prop > value)→examples/style-query-range.css - if() function: inline conditionals →
examples/if-conditional.css - Data attributes:
attr(data-*, type(<type>))with range queries →examples/style-query-attr.css
Anchor Positioning
Position elements relative to named anchors.
- anchor-name: name an element as target
- position-anchor: attach to named anchor
- anchor(): reference anchor coordinates
- position-area: logical placement (top, bottom, etc.)
Patterns
- Follow hover: dynamic anchor switching →
examples/anchor-follow.css - Fallback detection: style based on flip state →
examples/anchor-fallback.css
Scroll State Queries
Style based on scroll direction. Requires container-type: scroll-state.
- Values:
top,bottom,left,right,block-start,inline-end,none
Patterns
- Hide on scroll: header slides away on scroll down →
examples/scroll-state.css
Tree Counting
Index-based styling without hard-coded values.
- sibling-index(): 1-based position among siblings
- sibling-count(): total number of siblings
Patterns
- Staggered animation: delay based on position →
examples/sibling-index.css
Customizable Select
Style native <select> with full CSS control.
- appearance: base-select: opt into new rendering
- ::picker(select): style dropdown container
- : reflect selected option
Scroll Markers
CSS-only carousel navigation.
- ::scroll-button(direction): prev/next buttons
- ::scroll-marker: per-item indicators
- :target-current: active marker state
type() Function
Specify CSS data types for attr() and @function parameters.
- Types:
<angle>,<color>,<integer>,<length>,<length-percentage>,<number>,<percentage>,<string>,<time>,<url>,* - Combinators:
+(space-separated),#(comma-separated),|(either)
Patterns
- Typed attr(): read data attributes as CSS values →
examples/style-query-attr.css - Typed @function params: enforce parameter types →
examples/type-function.css
Relative Color Syntax
Modify color channels using oklch.
oklch(from var(--color) l c h / 50%) /* opacity */
oklch(from var(--color) l c calc(h + 30)) /* shift hue */
oklch(from var(--color) calc(l * 1.2) c h) /* lighten */
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です