Skip to content

Commit 77f0640

Browse files
committed
feat(build): Add minified CSS theme version to build
BREAKING CHANGE: You should now include the `default.css` file in your page to get the default styling. - Added `clean-css` as minifier - Updated build script - Updated documentation about loading it from jsdeliver - `npm shrinkwrap` madness
1 parent 9846a70 commit 77f0640

File tree

4 files changed

+2100
-2067
lines changed

4 files changed

+2100
-2067
lines changed

Diff for: README.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ API is unstable. We welcome any idea and pull request.
2727
- [Templates](#templates)
2828
- [Examples](#examples)
2929
- [Template configuration](#template-configuration)
30+
- [Themes](#themes)
3031
- [Development workflow](#development-workflow)
3132
- [Test](#test)
33+
- [Instant search configuration](#instant-search-configuration)
34+
- [Number locale](#number-locale)
35+
- [Initial search parameters](#initial-search-parameters)
36+
- [URL synchronisation](#url-synchronisation)
3237
- [Available widgets](#available-widgets)
3338
- [searchBox](#searchbox)
3439
- [stats](#stats)
@@ -39,7 +44,6 @@ API is unstable. We welcome any idea and pull request.
3944
- [refinementList](#refinementlist)
4045
- [menu](#menu)
4146
- [rangeSlider](#rangeslider)
42-
- [urlSync](#urlsync)
4347
- [hierarchicalMenu](#hierarchicalmenu)
4448
- [Browser support](#browser-support)
4549

@@ -184,6 +188,23 @@ You can configure the options passed to `Hogan.compile` by using `search.templat
184188

185189
Theses options will be passed to the `Hogan.compile` calls when you pass a custom template.
186190

191+
## Themes
192+
193+
To help get you started, we provide a default theme for the widgets. This is
194+
just a `css` file that you have to add to your page to add basic styling.
195+
196+
It is available from [jsDelivr](http://www.jsdelivr.com/):
197+
198+
```html
199+
<link rel="stylesheet" href="//cdn.jsdelivr.net/instantsearch.js/0/themes/default.min.css">
200+
<!-- or the unminified version -->
201+
<link rel="stylesheet" href="//cdn.jsdelivr.net/instantsearch.js/0/themes/default.css">
202+
```
203+
204+
It contains (empty) selectors for all the possible markup added by the widgets,
205+
so you can use it as a base for creating your own custom theme. We will provide
206+
more themes in the future.
207+
187208
## Development workflow
188209

189210
```sh
@@ -385,7 +406,7 @@ search.addWidget(
385406
);
386407
```
387408

388-
### Styling
409+
#### Styling
389410

390411
```html
391412
<div class="ais-stats">
@@ -573,7 +594,7 @@ search.addWidget(
573594
);
574595
```
575596

576-
### Styling
597+
#### Styling
577598

578599
```html
579600
<div class="ais-hits">

0 commit comments

Comments
 (0)