Skip to content

Commit 6747e9e

Browse files
committed
themes
1 parent 98f66d8 commit 6747e9e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ So the way you import the stylesheets would be something like this:
2828
@import jquery.ui.datepicker // import all the modules you need
2929
```
3030

31-
The big advantage that the jQuery UI stylesheets have been converted to Sass in this gem is that you now have a super easy way to customize the jQuery UI themes using simple Sass variables. You simply need to specify your own values **before** you import the jQuery UI stylesheets:
31+
The big advantage that the jQuery UI stylesheets have been converted to Sass in this gem is that you now have a super easy way to customize the jQuery UI themes using simple Sass variables. You simply need to specify your own values **before** you import the `jquery.ui.theme` stylesheet:
3232

3333
```sass
3434
// app/assets/stylesheets/application.css.sass
@@ -42,6 +42,20 @@ $bgColorContent: purple // set custom value for jQueryUI variable
4242

4343
For a list of all jQuery UI variables check out: https://github.com/jhilden/jquery-ui-sass-rails/blob/master/app/assets/stylesheets/_jquery.ui.variables.css.scss
4444

45+
## Themes
46+
47+
`jquery-ui-sass-rails` comes with variable sets for all the themes in the [jQuery UI Themeroller](http://jqueryui.com/themeroller/), you use them by importing the respective partial before the `jquery.ui.theme`:
48+
49+
```sass
50+
// app/assets/stylesheets/application.css.sass
51+
52+
@import themes/jquery.ui.smoothness // variables for 'smothness' theme
53+
54+
@import jquery.ui.core
55+
@import jquery.ui.theme
56+
@import jquery.ui.datepicker
57+
```
58+
4559

4660
## JavaScript
4761

0 commit comments

Comments
 (0)