Giter VIP home page Giter VIP logo

editor's People

Watchers

 avatar  avatar

editor's Issues

Test Issue

We probably need to step back a little and think about the usecases we can think of and not think about syntax etc
This week I have some responsive ads to design so I'm only doing what I need to do and keeping you all posted. But whatever it is I'm doing, it shouldn't prevent anybody else from brainstorming in any direction they feel like!
The syntax I've been describing on elements ((orientation: ) and (min-aspect-ratio: ) and (max-aspect-ratio: )) is already defined and currently supported on @media queries..
(I just deleted all my response about how useful nativeWidth would be etc..)
…for what benefit?
Just a reminder I built this demo, perhaps we could build some similar ones that demo other use cases?
What other use-cases do you envision? I'm a designer, and when I started thinking about making responsive ads this week I wrote down a few things:
Element orientation? (tall? long?)
Ad-based styles, or sub-element?
Locked aspect ratio?
Here's the sheet of paper with my questions on it that motivated my experiments yesterday.
If I knew I needed a 250x250 version, and a 600x100 version of an ad I could already do different form factors with predefined dimensions, but that wouldn't help me if the ad needs to scale with a locked aspect ratio sometimes as well!
Imagine (like I have to design today) that you are building an ad that will go in the middle of an article of text. It will be advertising 1 of 6 books (I have 6 ads to make for this). If this were an image-based ad we would have to drop that into the page and scale it so its text was always legible. If it is the full-column-width for phone users that ad will have to be a certain height. If we visit the same page on desktop there's a lot more room. We would either need to:
scale up the ad so it fills the column on desktop (which would be too tall at that width)
or give the ad a max-width and float or center it once it hits that max size (that's the text wrapping decisions, etc)
…but I'm thinking, “What if we can design this ad so it can scale with a locked aspect ratio sometimes, but also allow it to be as wide as there is horizontal room, and still be able to target it with styles and layout changes based on the dimensions it finds itself with, instead of predefined widths”.
I think being able to sniff an element's (orientation:) will come in handy, but not as useful as being able to define a range of responsive aspect ratios! So here's another demo, showing both a min-aspect-ratio and max-aspect-ratio showing how versatile aspect-ratio-detecting element queries can be!
This demo has an element you can resize. The element itself knows when it's roughly square, very wide, or very tall. This is the use-case I had in mind yesterday!. Note that the 'square' aspect ratio in this demo isn't stricly 1/1 like (orientation: square) would be, its what might be considered square_ish_ and covers

gif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.