You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
3.1 KiB

  1. ## Quick and Dirty Set-up
  2. 1) Rename the site configuration folder from ``/themes/_site`` to ``themes/site`` to avoid library updates modifying your site's settings.
  3. 2) Rename your semantic config file from ``semantic.config.example`` to ``semantic.config``
  4. 3) Use ``grunt build`` to output your project files, you can configure the paths used in ``grunt.config``.
  5. ## Overview
  6. * ``definitions/`` - contain all UI definitions
  7. * ``themes/packaged/default`` are the default UI styling of an element
  8. * ``themes/packaged`` are downloaded from the web or a package manager and provide preset overrides
  9. * ``themes/user`` are the only files you should modify, these are your site's overrides for LESS and variables
  10. ## Building CSS
  11. To make development easier, Semantic has a built in grunt config for building your project. Simply modify the **grunt.config** with the directories you need.
  12. You can also build the source files with any processor for LESS. Just keep in mind to customize ``site.variables`` with your asset paths for images and fonts.
  13. For information on installing grunt [see their guide](http://gruntjs.com/installing-grunt)
  14. ## Customizing Semantic
  15. **There is only one folder you should ever edit files in ``themes/site``.** These are your site's LESS overrides and variable settings.
  16. ### Using a default theme
  17. Leaving an element as ``default`` will use baseline UI stylings.
  18. The inheritance order when using default is:
  19. 1) ``themes/default/elements/button.variables`` loads the baseline UI variables
  20. 2) ``themes/packaged/default/elements/button.variables`` loads a blank file
  21. 3) ``themes/sites/elements.button.variables`` loads your variable overrides
  22. ### Using a packaged theme
  23. Packaged themes can be downloaded from the internet, and placed inside ``themes/packaged/``
  24. To use a packaged theme change the value inside ``semantic.config`` to the theme name.
  25. For example if you change your button theme to 'chubby' the following load order would occur:
  26. 1) ``themes/default/elements/button.variables`` loads the UI variables
  27. 2) ``themes/packaged/chubby/elements/button.variables`` loads the "downloadable" theme (this will allow for community packages) In this example, a button theme called *chubby*
  28. 3) ``themes/sites/elements.button.variables`` loads **your overrides for variables**
  29. ## Adjust your site's configuration
  30. To customize a ``ui button`` you can
  31. * Add variable overrides in ``site/elements/button.variables``
  32. * Add user LESS/CSS overrides in ``/site/elements/button.overrides`` (this will have all variables accessible)
  33. Semantic now also includes some site-wide configuration by default in ``site.less`` it is recommended you include this also.
  34. ## Advanced grunt usage
  35. ``grunt reset`` - Clears your build directory. Use this if you have a source file that is no longer being tracked.
  36. ``grunt build`` - This will build all files (not just watched files) in your source directory
  37. ## Gotchas & Tips
  38. Semantic **now requires a box-sizing reset** this allows us more flexibility inside the framework to not deal with issues related to calculating padding. This is included in ``site.less`` as well as a standard HTML reset.