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

css output format with media queries #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grauschnabel
Copy link

Hi there, as we talked on #198 I did just another output format.

I'm not the best ruby programmer, but for me this works just fine.

Inside my <head></head> u do like

<style type='text/css'>
{% picture css {{ overlay_img_path }} css page__hero_css %}

.page__hero_css {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
</style>

And later in the body just using the page__hero_css class for the div I want it to have.
The _data/picture.yml contains like:

presets:
  css:
    markup: css
    widths: [400, 600, 800, 1200, 1600]

Feel free to discuss or use that with adjustments...

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

Successfully merging this pull request may close these issues.

None yet

1 participant