Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 939 posts 2574 karma points
    Dec 04, 2014 @ 09:18
    Claushingebjerg
    0

    The holy grail of art direction...

    Slimsy is AWESOME. But i'm missing one key feature. It might be there, and i just need a pointer to make it work...

    Im having trouble getting my head around getting the focuspoint/art direction to work in a situation where the height of the continer is unknown/dynamic?

    Imagine a scenario where you have a block of text on the left and an image on the right of the text. I want the image cropped to fit the width (no problem) AND the height of the container.
    the problem is, that the height of the container varies based on the amount of  content, and i guess can't be calculated before its rendered in the browser.

    If this is somehow possible, it would be the greatest christmas present (That and U7.2 Final) :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 04, 2014 @ 09:23
    Jan Skovgaard
    0

    Hi Claus

    If I'm not misunderstanding your question it sounds like you're having the same issue as Iulia mentions in this post? http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/59273-Get-the-Cropper-object?p=0

    Don't know if it's perhaps possible to use this?

    img{
       max-width:100%;
       height:auto
    }
    

    /Jan

  • Claushingebjerg 939 posts 2574 karma points
    Dec 04, 2014 @ 09:43
    Claushingebjerg
    0

    Made a little illustration to explain what im after.

  • Nora 28 posts 97 karma points
    Dec 17, 2014 @ 02:08
    Nora
    0

    I have exactly the same requirement. Didn't figure out how to solve this using slimsy. Any help would be appreciated. Thanks a lot.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 17, 2014 @ 10:32
    Jeavon Leopold
    0

    Art direction is indeed the holy grail!

    You can in theory do it with the <picture> tag and its excellent polyfill, however I find it massively confusing, the best attempt at explaining it can be found here.

    Alternatively Matt Brailsford made wrote a blog post where he ported the old CropUp responsive JS to Umbraco v7 which pretty much also gives you art direction!

Please Sign in or register to post replies

Write your reply to:

Draft