Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force poppersize when containing blockeditor #809

Merged
merged 2 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/@sanity/components/src/dialogs/styles/PopOver.css
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,17 @@
padding: 0;
margin: 0;
}

/*
Composed by content that needs sizing only inside
the popper. See blockEditor for example
*/
.popper .largeContent {
@media (--screen-medium) {
width: 30rem;
}

@media (--screen-default) {
width: 38rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/* forces bigger dialog when in dialog */
composes: largeContent from 'part:@sanity/components/dialogs/default-style';
composes: largeContent from 'part:@sanity/components/dialogs/popover-style';
position: static;
}

Expand Down
37 changes: 37 additions & 0 deletions packages/test-studio/schemas/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,43 @@ export default {
}
]
},
{
title: 'Block in block',
name: 'blockInBlock',
type: 'array',
of: [
{type: 'block'},
{
name: 'footnote',
title: 'Footnote',
type: 'object',
options: {
inline: true
},
fields: [
{
title: 'Footnote',
name: 'footnote',
type: 'array',
of: [
{
type: 'block',
lists: [],
styles: [],
marks: {
decorators: [
{title: 'Strong', value: 'strong'},
{title: 'Emphasis', value: 'em'}
],
annotations: []
}
}
]
}
]
}
]
},
{
name: 'recursive',
type: 'object',
Expand Down