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

In external browser body should have some CSS #1617

Closed
manolo opened this issue Mar 20, 2018 · 1 comment
Closed

In external browser body should have some CSS #1617

manolo opened this issue Mar 20, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@manolo
Copy link
Member

manolo commented Mar 20, 2018

In Designer, the white paper container represents the viewport of a real browser, but opening the same stuff in external browser it behaves different, like is shown in the screenshots:

Code

<link rel="import" href="../../../bower_components/polymer/polymer-element.html">

<dom-module id="my-element">
  <template>
    <style include="shared-styles">
      :host {
        display: block;
        background: yellow;
        height: 100%;
      }
    </style>

    <div>
      Hello world
    </div>
  </template>

  <script>
    class OrderCard extends Polymer.Element {
      static get is() {
        return 'my-element';
      }
    }

    window.customElements.define(OrderCard.is, OrderCard);
  </script>
</dom-module>

Designer
screen shot 2018-03-20 at 15 30 10

Browser
screen shot 2018-03-20 at 15 29 21

The solution should be either:

  • Set browser body CSS with height: 100vh; margin: 0 or any other variant like position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: 0;
  • Allow the user to customise container behaviour, like size, flex, etc. and set those values to the external browser body.
@ripla
Copy link
Contributor

ripla commented Apr 3, 2018

We could just apply some reset styles in external preview, since all browsers seem to have 8px margin from user agent stylesheets.

@anssit anssit self-assigned this May 16, 2018
@ripla ripla added backlog and removed backlog labels May 16, 2018
@ripla ripla added this to the 3.0.2 milestone May 24, 2018
@ripla ripla closed this as completed May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants