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

Google logo floats left in non-US Google #7301

Closed
tgkokk opened this issue Aug 20, 2015 · 8 comments
Closed

Google logo floats left in non-US Google #7301

tgkokk opened this issue Aug 20, 2015 · 8 comments

Comments

@tgkokk
Copy link
Contributor

@tgkokk tgkokk commented Aug 20, 2015

For example, Google UK:

screen shot 2015-08-21 at 01 07 04

@frewsxcv frewsxcv added the I-wrong label Aug 21, 2015
@jdm jdm added the A-layout/inline label Aug 22, 2015
@sgmenda
Copy link
Contributor

@sgmenda sgmenda commented Aug 27, 2015

I wanna work on it, could you guide me @jdm

@mskrzypkows
Copy link

@mskrzypkows mskrzypkows commented Sep 21, 2015

I've found the root cause of floating left. Google uses <center> tag, inside there is <div> with align="left" attribute which causes logo to float left. Here is example html which shows the difference:

<html>
<body> 
    <center>            
        Test  <br><br>    
        <div style="background-color: #b0c4de; background-size:272px 92px;height:92px;width:272px"></div>
        <br><br>
        <div style="background-color: #b0c4de; background-size:272px 92px;height:92px;width:272px" align="left"></div>
    </center>
</html>
</body>
@jdm
Copy link
Member

@jdm jdm commented Sep 21, 2015

@jdm
Copy link
Member

@jdm jdm commented Sep 21, 2015

Then again, it may also be interacting with http://mxr.mozilla.org/servo/source/resources/servo.css#27 ?

@mskrzypkows
Copy link

@mskrzypkows mskrzypkows commented Sep 22, 2015

Here: http://mxr.mozilla.org/servo/source/components/layout/block.rs#2473 we have a check for <center> tag, if <div> has align="left" than input.text_align is not text_align::T::servo_center so there should be check for parent align or in other part, where input.text_align is set, there should be check for parent tag.
What do you think? Is it right direction?

@jdm
Copy link
Member

@jdm jdm commented Sep 22, 2015

That makes sense to me, but I will defer layout questions to people like @mbrubeck.

@jdm
Copy link
Member

@jdm jdm commented Sep 22, 2015

Perhaps we need a flag on nodes that are children of a <center> element, rather than a special text-align value.

eefriedman added a commit to eefriedman/servo that referenced this issue Oct 2, 2015
This adds -servo-left and -servo-right to complement -servo-center.

This intentionally doesn't try to address issue servo#7301.
@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Oct 2, 2015

@jdm Other browsers do use a special text-align value here though (-webkit-center and -moz-center).

eefriedman added a commit to eefriedman/servo that referenced this issue Oct 2, 2015
This adds -servo-left and -servo-right to complement -servo-center.

This intentionally doesn't try to address issue servo#7301.
bors-servo pushed a commit that referenced this issue Oct 8, 2015
Fully implement the "align descendants" rule for div.

This adds -servo-left and -servo-right to complement -servo-center.

~~This intentionally doesn't try to address issue #7301.~~  Commit added to address #7301.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7825)
<!-- Reviewable:end -->
@bors-servo bors-servo closed this in a31461b Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.