Skip to content

Commit

Permalink
fix: un-scope caption class names
Browse files Browse the repository at this point in the history
  • Loading branch information
msimmer committed Sep 10, 2022
1 parent c055e79 commit c44d562
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/b-ber-grammar-audio-video/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function createIFrame({
<iframe src="${Url.encodeQueryString(source)}" />
${
caption
? `<p class="bber-caption bber-caption__${mediaType}">${caption}</p>`
? `<p class="caption caption__${mediaType}">${caption}</p>`
: ''
}
</section>
Expand Down Expand Up @@ -121,7 +121,7 @@ export function createMediaInline({
</${mediaType}>
${
caption
? `<p class="bber-caption bber-caption__${mediaType}">${caption}</p>`
? `<p class="caption caption__${mediaType}">${caption}</p>`
: ''
}
</section>
Expand Down
4 changes: 1 addition & 3 deletions packages/b-ber-grammar-vimeo/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ export const renderPosterImage = poster =>
poster ? `<img src="${poster}" alt="Poster Image"/>` : ''

export const renderCaption = (caption, mediaType) =>
caption
? `<p class="bber-caption bber-caption__${mediaType}">${caption}</p>`
: ''
caption ? `<p class="caption caption__${mediaType}">${caption}</p>` : ''

export const getMediaType = type => {
const index = type.indexOf('-')
Expand Down
4 changes: 1 addition & 3 deletions packages/b-ber-lib/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@ export const renderPosterImage = poster =>
poster ? `<img src="${poster}" alt="Poster Image"/>` : ''

export const renderCaption = (caption, mediaType) =>
caption
? `<p class="bber-caption bber-caption__${mediaType}">${caption}</p>`
: ''
caption ? `<p class="caption caption__${mediaType}">${caption}</p>` : ''

export const getMediaType = type => {
const index = type.indexOf('-')
Expand Down
3 changes: 1 addition & 2 deletions packages/b-ber-reader-react/src/styles/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ $thumb-c: #272727;
color: $violet !important;
}

+ .caption__audio,
+ .bber-caption__audio {
+ .caption__audio {
margin-top: 8px;
}
}
Expand Down

0 comments on commit c44d562

Please sign in to comment.