選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

additional-styles.md 2.0KB

3年前
3年前
3年前
3年前
3年前
3年前
3年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ---
  2. layout: page
  3. title: Additional Styles / Custom Skin
  4. ---
  5. If you want to create additional styles like a company specific color for buttons, the background utility or something
  6. else you can simply create your own subversion of AdminLTE with the following SCSS template.
  7. In this example we create a custom button class called `.btn-custom-color` with an extra button style and a custom class
  8. called `.my-custom-style`.
  9. ```scss
  10. // Bootstrap
  11. // ---------------------------------------------------
  12. @import '~bootstrap/scss/functions';
  13. @import '~admin-lte/build/scss/bootstrap-variables';
  14. // Custom Theme Color START
  15. $custom-color: #00FF00;
  16. $theme-colors: map-merge((
  17. 'custom-color': $custom-color,
  18. ), $theme-colors);
  19. // Custom Theme Color END
  20. // Variables and Mixins
  21. // ---------------------------------------------------
  22. @import '~admin-lte/build/scss/variables';
  23. @import '~admin-lte/build/scss/mixins';
  24. @import '~bootstrap/scss/bootstrap';
  25. @import '~admin-lte/build/scss/parts/core';
  26. @import '~admin-lte/build/scss/parts/components';
  27. @import '~admin-lte/build/scss/parts/extra-components';
  28. @import '~admin-lte/build/scss/parts/pages';
  29. @import '~admin-lte/build/scss/parts/plugins';
  30. @import '~admin-lte/build/scss/parts/miscellaneous';
  31. // Custom Style START
  32. .my-custom-style {
  33. background-color: $custom-color;
  34. padding: .5rem 0;
  35. }
  36. // Custom Style END
  37. ```
  38. {: .max-height-300}
  39. You can also create a skin on top of AdminLTE with the following SCSS template.
  40. In this example we create a custom class called `.btn-custom-color` with a extra button style.
  41. ```scss
  42. // Bootstrap
  43. // ---------------------------------------------------
  44. @import '~bootstrap/scss/functions';
  45. @import '~admin-lte/build/scss/bootstrap-variables';
  46. @import '~bootstrap/scss/mixins';
  47. $custom-color: #00FF00;
  48. .btn-custom-color {
  49. @include button-variant($custom-color, $custom-color);
  50. }
  51. ```
  52. > ##### Warning!
  53. > These examples are only raw SCSS templates, you will still need a SCSS -> CSS build script to compile the SCSS to CSS!
  54. > {: .quote-warning}