h5p-editor-php-library icon indicating copy to clipboard operation
h5p-editor-php-library copied to clipboard

generic html and body styling

Open MiikaL opened this issue 6 years ago • 3 comments

Would it be possible to remove the generic html and body styling from the application.scss file? When using the editor as a component in an existing application, this kind of generic styling (particularly the body max-width) can mess up the larger application. Could it just be removed entirely, or then put behind a .h5p-editor class?

MiikaL avatar Mar 12 '18 08:03 MiikaL

I see what you mean, I guess there is no problem replacing them with a class.

But I do believe this styling is only used inside the iframe generated by the editor. There shouldn't be any need for loading this outside the iframe. You could of course drop the iframe, but I think you will run into other issues as well.

icc avatar Mar 22 '18 14:03 icc

This is related, so I'll comment here.

editor/styles/css/application.css and editor/styles/scss/application.scss both define max-width: 960px for the html and body elements. This arbitrarily restricts the width of the editor on larger screens.

porcospino avatar May 10 '19 12:05 porcospino

That is correct, we hope to improve this as we improve the editor experience. Currently, editors like the Branching Scenario overrides this to make use of all the space. The problem if we just remove this is that all the regular text fields will become way too big due to their default 100% width and this is not desirable in terms of UX.

icc avatar May 10 '19 14:05 icc