문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| bootstrap:theming [2021/11/13 11:37] – [수정] taekgu | bootstrap:theming [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | ====== Theming Bootstrap ====== | ||
| + | ===== Maps And Loops ===== | ||
| + | |||
| + | ==== 수정 ==== | ||
| + | **$theme-colors**Map의 기존 색상을 수정하려면 사용자 정의 Sass 파일에 다음을 추가하십시오. | ||
| + | <code css> | ||
| + | $theme-colors: | ||
| + | " | ||
| + | " | ||
| + | ); | ||
| + | </ | ||
| + | 추가하려면 | ||
| + | <code css> | ||
| + | $theme-colors: | ||
| + | " | ||
| + | ); | ||
| + | </ | ||
| + | 삭제하려면 | ||
| + | <code css> | ||
| + | // Required | ||
| + | @import " | ||
| + | @import " | ||
| + | @import " | ||
| + | |||
| + | $theme-colors: | ||
| + | |||
| + | // Optional | ||
| + | @import " | ||
| + | @import " | ||
| + | @import " | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ==== 필수 키 ==== | ||
| + | |||
| + | 부트스트랩은 우리가 직접 사용하고 확장할 때 Sass 맵 내에 특정 키가 있다고 가정합니다. 포함된 맵을 사용자 정의할 때 특정 Sass 맵의 키가 사용되는 경우 오류가 발생할 수 있습니다. | ||
| + | |||
| + | 예를 들어, 우리는 사용 primary, success및 danger에서 키를 $theme-colors링크, | ||
| + | | ||
| + | ==== 기능 ==== | ||
| + | <code css> | ||
| + | .custom-element { | ||
| + | color: gray(" | ||
| + | background-color: | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code css> | ||
| + | @function theme-color-level($color-name: | ||
| + | $color: theme-color($color-name); | ||
| + | $color-base: | ||
| + | $level: abs($level); | ||
| + | |||
| + | @return mix($color-base, | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code css> | ||
| + | .custom-element { | ||
| + | color: theme-color-level(primary, | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code css> | ||
| + | .custom-element { | ||
| + | color: color-yiq(theme-color(" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code css> | ||
| + | $border-radius: | ||
| + | $border-width: | ||
| + | |||
| + | .element { | ||
| + | // Output calc(.25rem - 1px) is valid | ||
| + | border-radius: | ||
| + | } | ||
| + | |||
| + | .element { | ||
| + | // Output the same calc(.25rem - 1px) as above | ||
| + | border-radius: | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code css> | ||
| + | $border-radius: | ||
| + | $border-width: | ||
| + | |||
| + | .element { | ||
| + | // Output calc(.25rem - 0) is invalid | ||
| + | border-radius: | ||
| + | } | ||
| + | |||
| + | .element { | ||
| + | // Output .25rem | ||
| + | border-radius: | ||
| + | } | ||
| + | </ | ||