You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`<x-slider>` is a carousel (*vanilla*) Web Component ([DEMOS](https://ciampo.github.io/x-slider/demo/))
6
+
`<macro-carousel>` is a carousel (*vanilla*) Web Component ([DEMOS](https://ciampo.github.io/macro-carousel/demo/))
7
7
8
8
Latest version: `0.9.1`
9
9
10
-
**Please note that this is still a WIP — [wait for version 1.0.0](https://github.com/ciampo/x-slider/milestone/1) !**
10
+
**Please note that this is still a WIP — [wait for version 1.0.0](https://github.com/ciampo/macro-carousel/milestone/1) !**
11
11
12
12
- Compatible with every framework
13
13
- Public APIs exposed as methods, events and properties/attributes
@@ -34,48 +34,48 @@ Run `npm run start` to start a local dev server and open the `demo/` page in you
34
34
35
35
## Usage
36
36
37
-
Please read the [full documentation](./docs/x-slider.md)
37
+
Please read the [full documentation](./docs/macro-carousel.md)
38
38
39
39
```html
40
-
<x-slider>
40
+
<macro-carousel>
41
41
<div>First slide</div>
42
42
<div>Second slide</div>
43
43
<div>Third slide</div>
44
-
</x-slider>
44
+
</macro-carousel>
45
45
46
-
<scriptsrc="x-slider.min.js"defer></script>
46
+
<scriptsrc="macro-carousel.min.js"defer></script>
47
47
```
48
48
49
-
For more examples, look at the demos ([Live demo](https://ciampo.github.io/x-slider/demo/), [Demo code](./demo/))
49
+
For more examples, look at the demos ([Live demo](https://ciampo.github.io/macro-carousel/demo/), [Demo code](./demo/))
50
50
51
51
## Browser support
52
52
53
53
### WebComponent Polyfills suite
54
54
55
-
In order for this Web Component to work on all evergreen browsers, you may need to add the [WebComponent polyfills suite](https://github.com/webcomponents/webcomponentsjs) to your page. (*Please note that this repository focuses on the `x-slider` Web Component, and not on the polyfills*)
55
+
In order for this Web Component to work on all evergreen browsers, you may need to add the [WebComponent polyfills suite](https://github.com/webcomponents/webcomponentsjs) to your page. (*Please note that this repository focuses on the `macro-carousel` Web Component, and not on the polyfills*)
56
56
57
-
All the demos in this repository already make use of the polyfills (by using [`webcomponents-loader.js`](https://github.com/webcomponents/webcomponentsjs#webcomponents-loaderjs)). The source code of the `x-slider` Web Component also makes optional calls to the `ShadyCSS` polyfill.
57
+
All the demos in this repository already make use of the polyfills (by using [`webcomponents-loader.js`](https://github.com/webcomponents/webcomponentsjs#webcomponents-loaderjs)). The source code of the `macro-carousel` Web Component also makes optional calls to the `ShadyCSS` polyfill.
58
58
59
59
Because of the [`ShadyCSS` polyfill limitations](https://github.com/webcomponents/shadycss#limitations), certain style rules are not applied in polyfilled browsers:
60
60
61
61
- all the rules that rely on the `:host-context()` selector are not polyfilled correctly (these rules are mainly around using the `focus-visible` polyfill)
62
62
- some of the more complex selectors using `:host()` are also not supported. This mainly impact the hover/focus states on navigation buttons.
63
63
- normally, external styles have the priority over the internal Web Component styles. But sometimes, after the polyfill's transformation, some internal selectors end up having a higher specificity then the external ones. This is quite an edge case, but keep an eye for it (e.g.: the [custom navigation demo](./demo/custom-navigation.html) uses the `!important` keyword to force some styles).
64
64
65
-
For browsers not supporting ES6 classes, the tranpiled ES5 version can be used instead (`x-slider.es5.min.js`), together with the [`custom-elements-es5-adapter.js`](https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs) polyfill. The [es5 demo](./demo/es5.html) shows how to do that.
65
+
For browsers not supporting ES6 classes, the tranpiled ES5 version can be used instead (`macro-carousel.es5.min.js`), together with the [`custom-elements-es5-adapter.js`](https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs) polyfill. The [es5 demo](./demo/es5.html) shows how to do that.
66
66
67
67
As browser support grows and the polyfills improve, these limitations should become less and less frequent and problematic.
68
68
69
69
### Other known cross-browser limitations
70
70
71
-
In order to change the color of the navigation button arrow, this project makes use of the `mask-image` CSS property. Unofruntaly, when this CSS feature is not supported, the color defined through `--x-slider-navigation-color-focus` is not going to be applied correctly to the arrow.
71
+
In order to change the color of the navigation button arrow, this project makes use of the `mask-image` CSS property. Unofruntaly, when this CSS feature is not supported, the color defined through `--macro-carousel-navigation-color-focus` is not going to be applied correctly to the arrow.
72
72
73
73
## Test
74
74
75
75
Run `npm run test` to run all tests.
76
76
77
77
## Whishlist
78
78
79
-
Please have a look at [the backlog](https://github.com/ciampo/x-slider/milestone/2) to see the plan for the next releases.
79
+
Please have a look at [the backlog](https://github.com/ciampo/macro-carousel/milestone/2) to see the plan for the next releases.
80
80
81
81
If you have a feature request, feel free to open an issue!
<!-- `navigation` adds previous and next buttons -->
73
-
<x-slidernavigation>
73
+
<macro-carouselnavigation>
74
74
<articleclass="slide">Slide 1</article>
75
75
<articleclass="slide">Slide 2</article>
76
76
<articleclass="slide">Slide 3</article>
77
77
<articleclass="slide">Slide 4</article>
78
-
</x-slider>
79
-
<p>If the CSS properties to customize the <code>x-slider</code> navigation buttons are not enough for your needs, you can always use any custom UI and call the `previous()` and `next()` methods.</p>
78
+
</macro-carousel>
79
+
<p>If the CSS properties to customize the <code>macro-carousel</code> navigation buttons are not enough for your needs, you can always use any custom UI and call the `previous()` and `next()` methods.</p>
0 commit comments