Skip to content

Commit

Permalink
fix: swiper css scope (#836)
Browse files Browse the repository at this point in the history
* fix: only load swiper css in carousel

* docs: update changelog
  • Loading branch information
ksted authored Nov 28, 2024
1 parent 23e030b commit 77096cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/web/components/ui/HeroCarousel/HeroCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import { HeroContentProps } from './types';
import { Swiper, SwiperSlide } from 'swiper/vue';
import { Navigation, Pagination } from 'swiper/modules';
const { handleArrows, onSlideChange } = useCarousel();
import '@/assets/libraries/swiper/swiper.min.css';
import '@/assets/libraries/swiper/navigation.min.css';
import '@/assets/libraries/swiper/pagination.min.css';
const { heroItemProps } = defineProps<{
heroItemProps: HeroContentProps[];
}>();
const enableModules = computed(() => heroItemProps.length > 1);
</script>

<style src="./styles/navigation.min.css"></style>
<style src="./styles/pagination.min.css"></style>
<style src="./styles/swiper.min.css"></style>
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Each client supports two PWA instances. With this change, you can designate the
- The language selector is no longer displayed if only one language is configured.
- Fixed an issue with category product prices not being updated on page change.
- Added SSR rendering for homepage.
- CSS for the Swiper library is now only loaded on pages that use the `HeroCarousel` component.
- The `HeroCarousel` no longer overlaps the navigation menu on mobile devices.
- Improved CLS for hero skeleton.

Expand Down

0 comments on commit 77096cc

Please sign in to comment.