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

Page-margin boxes (@top-center, etc) #4034

Open
likyh opened this issue Jan 29, 2018 · 5 comments
Open

Page-margin boxes (@top-center, etc) #4034

likyh opened this issue Jan 29, 2018 · 5 comments

Comments

@likyh
Copy link

@likyh likyh commented Jan 29, 2018

top-center等和@page相关的内容
https://drafts.csswg.org/css-page-3/#at-page-rule

@Fyrd Fyrd changed the title top-center等和@page相关的内容 Page-margin boxes (@top-center, etc) Jan 31, 2018
@Fyrd
Copy link
Owner

@Fyrd Fyrd commented Jan 31, 2018

I believe this refers to "Page-margin boxes" , defined at https://drafts.csswg.org/css-page-3/#margin-boxes

Support for other paged media properties is already on the site at https://caniuse.com/#feat=css-paged-media

@likyh
Copy link
Author

@likyh likyh commented Mar 22, 2018

no no no, i think Page-margin boxes not only @page, and i need @top-center and so.

@edgar444
Copy link

@edgar444 edgar444 commented Jul 13, 2018

Chrome does support @page, like

@page {
  margin: 5cm;
}

but does not support "Page-margin boxes", like

@page {
  @top-center {
    content: "4422";
    background-color: red;
    border: black 5px solid;
    width: 5cm;
    height: 5cm;
  }
}

Played around in practice by trying to print pdf from chrome 67. And I failed. There is software like weasyprint that did produce the red boxes. Anyway, It's a nice detail to advertise.

@tswaters
Copy link
Contributor

@tswaters tswaters commented Aug 18, 2018

I'm very surprised to see a lot of green on the @page page. The linked spec lists a lot of things that no browsers even come close to supporting -- page-margin-box-type and the like.

Seeing the green here for chrome implies full support, but it seems this is only tracking the actual @page and not everything else in the spec.... everyone I've seen has partial support at best.

@gustavshf
Copy link

@gustavshf gustavshf commented Aug 29, 2019

@page margin boxes don't seem to be supported in any major browsers at this moment at all. So yeah, the green boxes in https://caniuse.com/#feat=css-paged-media are quite misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants