Closed FdezRomero closed 7 years ago
@FdezRomero Thanks for the issue! Are you only using one direction or does your app require both? If you only need one direction can you set the following variable in your Sass and let me know if that works for you:
$app-direction: ltr;
That is fair.
What I suggest doing is either setting a strict direction like @brandyscarney suggested (which does not use [dir=ltr]
), or use our new sass mixins to handle multi directional apps.
See our newly released blog post in the matter.
Thanks @brandyscarney @AmitMY! I confirm that adding $app-direction: ltr;
in variables.scss
removes the LTR/RTL selectors and everything works as usual. 🎉
It would be a good idea to add this to both the changelog and release info, as it may be considered a breaking change.
@FdezRomero I am releasing v3.4.1 which will set it to ltr
by default. It should be out any minute.
Thanks for the heads up @brandyscarney! You are doing an amazing job, you really are 😎👌
Thank you! So I actually just released a 3.4.2
after finding an issue with changing the default $app-direction
- so it will be ltr
by default, can be set to rtl
for rtl only or multi
for both. We'll have the docs updated to reflect this soon. Thanks for bringing this to our attention!
This has cost us 2 weeks of debugging time.
@nottinhill Next time:
Setting that "cost" in $ is really irrelevant, as there are many things you could have done to solve this in 3-8 hours, tops, depending on timezone.
^^I read this message just now, and it sounds a bit aggressive. That is not my intent :), I just want to inform you of what to do next times when something as major as this happens.
@AmitMY would you kindly point me to a section of the changelog, where it mentions that custom css gets overwritten and the fix of that bug? In a complex development environment it is not trivial to understand that this is the issue. You are developing a big and popular framework. If your major release has a major bug like this, which is really easy to find during the testing of your release, as a developer I would expect a big notice about that bug (like "BEWARE OGRES") and a sorry from your side.
I can't point you in 3.4.0, as there was no announcement of a breaking change. But, it is just step 1. Steps 2 and 3 are still valid for this case, and each could have got your issue fixed immediately.
This was a non-desired breaking change, and we ran the tests inside the app multiple times, and there was a nightly released that was requested for maintainers to see if it breaks their app, and no one said anything, it was assumed that the version is solid. However, If you do read the CHANGELOG, 1 day after 3.4.0 there was a patch released 3.4.1 which fixed this.
I am the one who created this breaking change, and really, didn't think through all of the cases, as v3.4.0 includes a massive amount of changes to the styling (at least 50% of the css selectors in this project), and the tests normally cover style issues, A nice read about the tests we ran.
I don't see a need to apologize. You have a bug on an open source project? It is your duty (as a user of an open source project) to create an issue, like this issue creator did. Plus, you can always downgrade to a previous version and life would be dandy. (even if you don't know what causes the issue: "v3.4.0 styles are not the same as v3.3.0" is all you have to say for people to get what is the problem or at least investigate.
Note that I do not speak for the employees of Ionic, I am just a guy giving my free time to perfect this awesome framework.
Thanks for your thoughts. However I must say, since we started using Ionic 2 Beta we burned through a lot of resources and money, nerves, tears and sweats. I am in the business of building reliable infrastructure which seems in the case of ngx and ionic not to be possible without a dedicated DevOps Team RSS-ing onto Ionic's changelog stream 24/7. We never experienced anything as buggy and ever-changing like Ionic and I am really looking forward to future projects ∈ \ Ionic.
I am a one man team, and I manage to get a grip on the changelog on all of the packages I star on github using sibbell. I do wanna correct you on one thing, there is no "changelog stream", it is more like a per-release change, so more like a blog thing.
Glad to help clarify everything. It is your choice what to use, and thanks for using Ionic at least for now.
Locking this issue as the conversation here is not productive. If there are any issues, please be sure to update the the latest release. 3.4.0 had a unintentional breaking change, we addressed it by releasing 3.4.2 and notifying people of the release and what it fixes in the changelog.
Ionic version: (check one with "x") [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: The new CSS rules introduced in 3.4.0 for LTR/RTL are prefixed with the attribute selector
[dir="ltr"]
or[dir="rtl"]
(from the root<html>
tag), but these rules always having a higher specificity than the ones you would normally write inside a page break the custom styles of our app.The only solutions we came up with are adding specificity to our current selectors (would require to top 4 classes/attributes), using
!important
on every conflicting rule (not recommended for so many reasons) or prefixing the page selectors in every SCSS file, like[dir] page-home {...}
.Expected behavior: LTR/RTL selectors to use a lower specificity so we can override Ionic rules easily and cleanly, as we have been doing. Splitting problematic LTR/RTL joint rules (
[dir="ltr"] .some-class, [dir="rtl"] .some-class
) in two would halve specificity to0, 0, 2, 0
.Steps to reproduce:
<button ion-button class="my-button"></button>
to a page.page-name { .my-button { padding: 16px; margin: 0; } }
.[dir="ltr"] .button-(mode), [dir="rtl"] .button-(mode)
selector.ion-card
,ion-card-content
,ion-chip
, etc.Related code: N/A
Other information: N/A
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):