Comments (5)
Hey @zackphilipps thanks I think this could be something to look into for the next major update. Not sure when though... :(
from gutenberg.
I think the root of the issue is more about design theory than the actual JS function.
So I think the question should be: Is necessary to make everything follow a vertical grid on the web?
In print is a common practice but is also a static medium, and the web is an incredibly dynamic place, so is almost impossible to get that right. Also, let's consider that this is a generic library, so is impossible to know the exact use cases for everybody.
So I think the right way to handle vertical rhythm on the web is to not worry too much about element heights, only about elements spacing. In this case, we get to the simplest scenario where we don't have to deal with setting the right height for images (potentially getting distortion), for example, but this can also be applied to other tricky elements like dynamic heading sizes.
By getting consistent spacing on the elements we already get a good visual result, aligning everything to a grid is not important, nobody would notice it unless the lines of a grid are present.
I hope this all makes sense. What I'm saying is just a constructive critic, I also had to manage this stuff with Concise CSS and this is the route I took. I also created a lh
unit for this same reason: https://github.com/KolceThompsonCo/postcss-lh and with it I just write how many "grid rows" of spacing I want for a certain element, without worrying about anything else.
What do you think @matejlatin?
from gutenberg.
Hey @jameskolce yes that was my original thought as well and I think I even wrote somewhere in the instructions that people shouldn't obsess too much with the height of the images. There should be a simple way to either enable or disable this JS fix but for the presentation purposes I left it in... might remove it in the future and only keep it in the examples.
from gutenberg.
I can check a way to enable/disable it easily this afternoon, will let you know if I get something!
from gutenberg.
So I just checked and I think the way to do it with minimal changes is just to add a global variable like var autofixImgHeight = false
, and check for its value before calling the fixImgHeight
function. Though splitting everything into a function an pass a configuration object would be a better solution.
from gutenberg.
Related Issues (20)
- fill out documentation HOT 1
- figure and paragraph indent conflict? HOT 17
- Grunt ignores scss files in folders in src/style HOT 6
- Switch to node-sass HOT 2
- Getting more done in GitHub with ZenHub
- no second-order grid HOT 6
- Override variables in horizontal-rule.scss HOT 1
- Gutenberg doesn't play nice with other styles/libs HOT 8
- How to change font-size in Sass code? HOT 1
- How to customize font-size in media queries?
- Why there's 2 font-sizes for headings?
- Consider typographic baseline
- <em> <i> excessive property HOT 3
- Is the project still alive? HOT 2
- Why is double grid needed? HOT 1
- Remove external font dependencies HOT 2
- License question
- Some vars not used
- Hardcoded image url in helpers/grid
- Deprecation warning: Need to wrap division in `calc()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gutenberg.