Skip to content

synchrovision/catpow-scss

Repository files navigation

catpow-scss

catpow-scssは色やサイズの設定設定値を複数のscssファイルで共有するためのmixin集です。 2〜3文字の短い名前のmixinで、複数のプロパティを同じく2〜3文字の短い名前で指定して設定します。

Install

git submodule add https://github.com/synchrovision/catpow-scss.git scss/catpow

INDEX

Main Mixin

プロパティ 概要 Document GitHub
anm animation アニメーション関連 Document Code
bdr border border-radius ボーダー関連 Document Code
bg background background-image background-position background-size 背景色、背景画像、グラデーション Document Code
bnd display position width height margin padding overflow object-fit object-position レイアウト・サイズ・余白を設定 Document Code
bp @media 画面幅によるメディアクエリ Document Code
cnt counter-reset counter-increment content カウンターの表示 Document Code
col column column-rule column-gap カラムサイズとカラム境界線の設定 Document Code
ctn @container コンテナクエリ Document Code
flx flex justify-content align-content justify-items align-items フレックスレイアウト関連 Document Code
grd grid グリッドレイアウト関連 Document Code
shd box-shadow text-shadow ドロップシャドウ関連 Document Code
svg fill stroke text-anchor dominant-baseline SVG関連 Document Code
tbl table-layout border-collapse border-spacing テーブル関連 Document Code
trn transition transform mix-blend-mode filter animation perspective トランジション、変形、透明 Document Code
txt text-align font-size line-height font-family color vertical-align 文字揃え、文字サイズ、文字色 Document Code
plh ::placeholder プレースホルダーの文字サイズ、文字色など Document Code
usr cursor pointer-event user-select カーソル、ユーザー操作・選択の受付 Document Code

mixin

概要 Document GitHub
default_break ブラウザのデフォルトの余白や境界線の設定、モバイルブラウザの文字サイズ調整などをなくし、ブラウザによる表示の差異を抑制します。 Document Code
hide_scrollbar スクロールバーを非表示にします。 Document Code
define_color_vars get_color_vars関数が定義されている場合に、引数の色の値のマップまたはグローバル変数$colorsを元にそれらのCSS変数を:rootに定義するコードを出力します。catpow-ssg環境下では各色をhslaに分解したCSS変数が定義されます。 Document Code
define_color_classes get_color_classes関数が定義されている場合に、引数の色の値のマップまたはグローバル変数$colorsを元に色の設定を行うクラスを定義するコードを出力します。catpow-ssg環境下ではdefine_color_varsによって各CSS変数が定義されていることを前提に、12段階で色相を分割した各色のクラスを定義します。 Document Code
clear_float 回り込み解除のスタイルを適用します。 Document Code
clear_fix フロートレイアウトのコンテナのafter擬似要素に回り込み解除のスタイルを適用します。 Document Code
pull_left 左回り込みのスタイルを適用します。 Document Code
pull_right 右回り込みのスタイルを適用します。 Document Code
flex_equalize 子要素の数によってflex-basisを調整し、行ごとの要素数の差が1以上にならないようにします。 Document Code
gradient グラデーションを作成します。 Document Code
linear-gradient 線型グラデーションを作成します。 Document Code
radial-gradient 円形グラデーションを作成します。 Document Code
shade 陰によって立体感を表現するグラデーションを作成します。 Document Code
glass ガラスのような光沢を表現するグラデーションを作成します。 Document Code
mist うっすらとかかるもやを表現するグラデーションを作成します。 Document Code
stripe 縞模様を表現するグラデーションを作成します。 Document Code
round_table 表の4隅を角丸にします。 Document Code
text-decoration 下線や打ち消し線などのテキスト装飾を短縮表現の値のリストで設定します。 Document Code
text-emphasis テキストの圏点を短縮表現の値のリストで設定します。 Document Code
wp_admin_color wordpressのwp-admin/css/colors/_variables.scssで定義されるSCSS変数を一括で定義します。 Document Code

function

概要 Document GitHub
is_quoted 変数がクオート付の文字列であるかを判定します。正確にはget_real_typeの関数が存在する場合に、get_real_typeから得られる値の型がstringであるかを判定します。scssphpではクオートで括られていない文字列の型はstringではなくkeywordです。get_real_typeが定義されていない環境下では単にstring型であるかどうかの判定をします。 Document Code
tint 色の濃さを変更してrgb形式で返します。 Document Code
ease animation-timing-functionやtransition-timing-functionで用いるイージングのキーワードやeasing-funcitonを返します。 Document Code
replace_values 第一引数の値、もしくはリスト内の値を、第二引数のマップに基づいて置き換えます。 Document Code
fill_4_values 値が4つ未満のリストをmarginやpaddingの値の補完と同様のルールで4つの値をもつリストに補完します。 Document Code
img background-imageなどで用いる画像URLの値を返します。グローバル変数$imagesが定義されていればそこから画像のURLの値を取得します。 Document Code
sel グローバル変数$selectorsを用いてセレクタの値を置き換えます。 Document Code
clr colorやbackground-colorなどで用いる色の値を返します。translate_color関数が定義されていればその関数から、グローバル変数$colorsが定義されていればそれから色の値を取得します。 Document Code
sz widthやheightなどで用いるサイズの値を返します。translate_size関数が定義されていればその関数から、グローバル変数$sizesが定義されていればそれからサイズの値を取得します。 Document Code
szs marginやpaddingなどで用いるサイズの値のリストを返します。translate_size関数が定義されていればその関数から、グローバル変数$sizesが定義されていればそれからサイズの値のリストを取得します。 Document Code
wt font-weightで用いる文字の太さを表す値を名を返します。 translate_weight関数が定義されていればその関数から、グローバル変数$weightsが定義されていればそれから文字の太さの値を取得します。 Document Code
fnt font-familyで用いるフォント名を返します。translate_font関数が定義されていればその関数から、グローバル変数$fontsが定義されていればそれからフォント名を取得します。 Document Code
slice リストから範囲を指定して部分を取り出し新たなリストを取得します。 Document Code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages