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

[4.0] switcher legend alignment #24802

Merged
merged 6 commits into from
May 18, 2019
Merged

[4.0] switcher legend alignment #24802

merged 6 commits into from
May 18, 2019

Conversation

brianteeman
Copy link
Contributor

make sure that the switcher is always left aligned

before

image

after

image

Make sure that the legend is left aligned in all cases
@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels May 5, 2019
@brianteeman
Copy link
Contributor Author

updated branch to trigger appveyor to run again as the error in appveyor was infrastructure and nothing to do with this pr

@infograf768
Copy link
Member

We need specific switcher css for rtl as it is really broken in rtl (same in new admintemplate)

@brianteeman
Copy link
Contributor Author

Everything in the new admin template is broken. There is no point doing any RTL fixes until they finish deciding what a form should look like.

@infograf768
Copy link
Member

infograf768 commented May 12, 2019

FYI, we also have issue concerning LTR for the existing code here.

.col-md-9 .switcher__legend {
   margin-left: -220px;
 }

breaks the switcher in new admin template when editing a module:
Screen Shot 2019-05-12 at 08 27 35
If taken away, we rightfully get
Screen Shot 2019-05-12 at 08 31 50

Therefore is it really useful to correct anything concerning switcher in this branch?

@brianteeman
Copy link
Contributor Author

Already raised am issue on their repo. But as their repo is pretty messed up it's probably a waste of time

@chmst
Copy link
Contributor

chmst commented May 12, 2019

I have tested this item ✅ successfully on fe6a353

Can you give me the link to your issue on "their" repo?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24802.

@brianteeman
Copy link
Contributor Author

@chmst
Copy link
Contributor

chmst commented May 12, 2019

thx

@richard67
Copy link
Member

I have tested this item ✅ successfully on fe6a353


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24802.

@ghost
Copy link

ghost commented May 18, 2019

Status "Ready To Commit".

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 18, 2019
@roland-d roland-d merged commit d8c5eb1 into joomla:4.0-dev May 18, 2019
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 18, 2019
@brianteeman
Copy link
Contributor Author

Thanks

@brianteeman brianteeman deleted the sunday_2 branch May 18, 2019 20:54
@zero-24 zero-24 added this to the Joomla 4.0 milestone May 19, 2019
@Quy
Copy link
Contributor

Quy commented May 23, 2019

Please fix the switcher alignment when in the sidebar (ie edit article).

switcher

@ghost
Copy link

ghost commented May 23, 2019

@Quy can you please open a new Issue?

@infograf768
Copy link
Member

infograf768 commented May 23, 2019

PR should be simple (for the admin template we have now...)
Move in switcher.scss

.col-md-3 .switcher__legend {
  margin-left: 0;
}

after

.col-md-9 .switcher__legend,
.col-md-12 .switcher__legend {
  margin-left: -220px;
}

@chmst
Copy link
Contributor

chmst commented May 23, 2019

It is fixed. Did you run npm i?

@brianteeman
Copy link
Contributor Author

you beat me too it @chmst

@infograf768
Copy link
Member

I did
As I said, the order counts.

@brianteeman
Copy link
Contributor Author

Works for me

image

@infograf768
Copy link
Member

I use firefox macintosh and this is what exactly happens:

.col-md-9 .switcher__legend,
.col-md-12 .switcher__legend {
  margin-left: -220px;
}

is overriding .col-md-3

Screen Shot 2019-05-23 at 10 13 08

@brianteeman
Copy link
Contributor Author

I can see it now after another rebuild
I will take a look at why later today. It makes no sense that that css is being used when it is a col-md-3

@infograf768
Copy link
Member

Apologies are accepted.

@infograf768
Copy link
Member

No need to look why. It is pretty obvious
Basically, as

.col-md-12 .switcher__legend {
  margin-left: -220px;
}

is loaded after col-md-3
it overrides it.

@brianteeman
Copy link
Contributor Author

Not obvious to me as col-md-3 is more specific so should be the one used as far as I understand CSS. I will not submit a pr myself without understanding why

@Bakual
Copy link
Contributor

Bakual commented May 23, 2019

The problem is likely that there is also an element with col_md-12 somewhere up the tree. In this case both CSS rules have the same specificity (a class as the child of another class). It doesn't matter which parent class is "closer" in the tree.
And since they are equal, the later wins.

@infograf768
Copy link
Member

Exact. Creating patch now

@infograf768
Copy link
Member

See #24993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants