New issue
Advanced search Search tips

Issue 816137 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Feature request] Allow math calculations while editing style properties

Reported by me.br...@gmail.com, Feb 24 2018

Issue description

The idea is pretty simple, allow math calculations for style property field to avoid switching between a calculator app and dev tools. This feature is inspired by Photoshop where you can position and resize objects like that which I found quite handy. I hacked a few lines into the source code to demonstrate how this could work (gif attachment).


Let me know if this is something others might find useful too, and I would be happy to work on a PR.

 
demo.gif
11.8 KB View Download

Comment 1 by cnardi@chromium.org, Feb 25 2018

Components: Blink>CSS
Status: WontFix (was: Unconfirmed)
I'm marking this as WontFix because I believe the functionality you want is already contained by the calc() function (https://developer.mozilla.org/en-US/docs/Web/CSS/calc). For example, in your demo, you'd just use calc(10px + 10px).

calc() should be supported anywhere a number/dimension is accepted; if you run across somewhere it isn't that's probably a bug which should be filed.

Comment 2 by me.br...@gmail.com, Feb 27 2018

Strictly speaking this isn't the same, but I get your point. It's supported through css, so why adding another option to achieve the same. Well, I would argue my proposal is for developers which want to try out things quickly without less typing (similar to ARROW_DOWN or ARROW_UP key which increase or decrease a value). However, thanks for responding. 

Sign in to add a comment