Skip to content

Commit

Permalink
fix: remove overflow tailwind classes from sandbox, fix #351
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Nov 11, 2022
1 parent 875cf7d commit a326a6a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/nuxt3/cypress/e2e/render-story.cy.js
Expand Up @@ -17,6 +17,6 @@ describe('Story render', () => {

it('should render NuxtLink', () => {
cy.visit('/story/components-basebuttonlink-story-vue?variantId=_default')
cy.get('.__histoire-sandbox a').contains('Hello world')
cy.get('.histoire-generic-render-story a').contains('Hello world')
})
})
2 changes: 1 addition & 1 deletion examples/vue3/cypress/integration/toolbar-background.js
Expand Up @@ -50,7 +50,7 @@ describe('background color', () => {
cy.get('[data-test-id="background-popper"]').should('be.visible').find('button').should('have.length', 6).each(($el, index) => {
cy.wrap($el).click()
cy.get('[data-test-id="responsive-preview-bg"]').should('have.css', 'background-color', backgroundColorShouldBe[index])
cy.get('.__histoire-sandbox .text').should('have.css', 'color', contrastColorShouldBe[index])
cy.get('.histoire-generic-render-story .text').should('have.css', 'color', contrastColorShouldBe[index])
cy.get('[data-test-id="toolbar-background"]').click()
})
})
Expand Down
Expand Up @@ -29,7 +29,7 @@ watchEffect(async () => {
<component
:is="mountComponent"
v-if="mountComponent"
class="histoire-generic-render-story"
class="histoire-generic-render-story htw-sandbox-contain"
:story="story"
v-bind="$attrs"
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-app/src/app/style/main.pcss
Expand Up @@ -64,7 +64,7 @@ button {
}
}

.__histoire-sandbox {
.htw-sandbox-contain {
contain: content;
}

Expand Down
4 changes: 4 additions & 0 deletions packages/histoire-app/src/app/style/sandbox.css
Expand Up @@ -17,3 +17,7 @@ html {
.htw-sandbox-hidden {
display: none;
}

.htw-sandbox-contain {
contain: content;
}
1 change: 0 additions & 1 deletion packages/histoire-plugin-vue/src/client/app/RenderStory.ts
Expand Up @@ -240,7 +240,6 @@ export default _defineComponent({
render () {
return _h('div', {
ref: 'sandbox',
class: '__histoire-sandbox htw-overflow-auto',
})
},
})
Expand Up @@ -251,7 +251,6 @@ export default _defineComponent({
render () {
return _h('div', {
ref: 'sandbox',
class: '__histoire-sandbox htw-overflow-auto',
})
},
})
Expand Up @@ -160,7 +160,6 @@ export default _defineComponent({
render () {
return _h('div', {
ref: 'sandbox',
class: '__histoire-sandbox htw-overflow-auto',
})
},
})

0 comments on commit a326a6a

Please sign in to comment.