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

adds left margin to margin-left #16

Open
arush opened this issue Dec 6, 2011 · 6 comments
Open

adds left margin to margin-left #16

arush opened this issue Dec 6, 2011 · 6 comments

Comments

@arush
Copy link

arush commented Dec 6, 2011

I use margin to position my absolute elements, I've found it to be better in many scenarios than using left:0; top:0; etc...

When using plax, in Chrome and Safari (not FF) plax adds the 'left: 362px' where i have margin-left: 362px , therefore making it positioned too far left by 362px (its total margin is now 724px).

This is really annoying.

@arush
Copy link
Author

arush commented Mar 20, 2012

I'm not great with regex stuff sorry!

Sent from my iPhone

On 20 Mar 2012, at 10:37, Phil Ricketts
reply@reply.github.com
wrote:

The reason it affects margin-left (I think), is because it does a regexp match on 'left' and 'top' - so values associated with 'margin-left' and 'margin-top' will get picked up by this.

Not too hard to fix it if you want to look into it, arush?


Reply to this email directly or view it on GitHub:
#16 (comment)

@cameronmcefee
Copy link
Owner

Hi Guys,

There's no regex. It's specifically targeting the top and left properties. I'm hesitant to support margins as a positioning method. top and left are css properties specifically designed for coordinate positioning, whereas using margins is technically a workaround.

@arush Can you provide specific examples of why it would be better to support margin-based positioning.

@arush
Copy link
Author

arush commented Mar 23, 2012

Margins provide a completely different positioning functionality which
is impossible to achieve through the use of top and left for an
absolutely positioned element when it is surrounded by a relatively
positioned element. I'm sorry I don't really know how else to explain
it without an example and I have since redesigned my example!

Sent from my iPhone

On 23 Mar 2012, at 16:42, Cameron McEfee
reply@reply.github.com
wrote:

Hi Guys,

There's no regex. It's specifically targeting the top and left properties. I'm hesitant to support margins as a positioning method. top and left are css properties are specifically designed for coordinate positioning, whereas using margins is technically a workaround.

@arush Can you provide specific examples of why it would be better to support margin-based positioning.


Reply to this email directly or view it on GitHub:
#16 (comment)

@replete
Copy link

replete commented Mar 23, 2012

Sorry, I've confused matters here by misunderstanding @arush's problem. I've removed my posts, and will open a new thread.

@replete
Copy link

replete commented Mar 23, 2012

@arush you could add an intermediate element with {position:relative}, that's how I'd achieve it.

@cameronmcefee
Copy link
Owner

I'll give this some thought. You're more than welcome to submit a pull request for what you suggest in the meantime.

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

No branches or pull requests

3 participants