Created
June 19, 2013 20:04
Revisions
-
kizu revised this gist
Jun 19, 2013 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,13 +30,15 @@ background: rgba(255,0,0,0.25); } /* For Firefox */ @-moz-document url-prefix() { .b-wrapper_fixed .b-shrinker { display: inline-flex; flex-direction:row-reverse; } .b-wrapper_fixed .b-shrinker__left { /* magic number, yeah, but… */ /* it should be really big to override the bug */ flex-shrink: 1000000000; } } -
kizu revised this gist
Jun 19, 2013 . 2 changed files with 5 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,18 +32,11 @@ @-moz-document url-prefix() { .b-wrapper_fixed .b-shrinker { display: inline-flex; flex-direction:row-reverse; } .b-wrapper_fixed .b-shrinker__left { flex-shrink: 10000000; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} -
kizu created this gist
Jun 19, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ /* The most closest fix for the http://stackoverflow.com/q/7309593/885556 problem */ .b-wrapper { padding-right: 10px; } .b-shrinker { display: inline-block; max-width: 100%; height: 1.25em; padding: 5px; margin: 0 0 5px; overflow: hidden; border: 1px solid blue } .b-shrinker__left { background: rgba(0,255,0,0.25); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .b-shrinker__right { float: right; margin: 0 0 0 5px; background: rgba(255,0,0,0.25); } @-moz-document url-prefix() { .b-wrapper_fixed .b-shrinker__in { display: -moz-box; -moz-box-orient: horizontal; -moz-box-direction : reverse; } .b-wrapper_fixed .b-shrinker__left { white-space: normal; word-break: break-all; -moz-box-flex: 1; height: 1.2em; } .b-wrapper_fixed .b-shrinker__right { -moz-box-flex: 1; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ <h2>Broken in Fx</h2> <p>Left part shrinks too much if it's shorter than right one.</p> <div class="b-wrapper"> <div class="b-shrinker"> <div class="b-shrinker__right">Right part</div> <div class="b-shrinker__left">Some very long string. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div> </div> <div class="b-shrinker"> <div class="b-shrinker__right">Right part</div> <div class="b-shrinker__left">Short string</div> </div> <div class="b-shrinker"> <div class="b-shrinker__left">Short string, no right part</div> </div> <div class="b-shrinker"> <div class="b-shrinker__right">Long, long, long right part</div> <div class="b-shrinker__left">Short string</div> </div> </div> <h2>Fixed using some flexboxing:</h2> <div class="b-wrapper b-wrapper_fixed"> <div class="b-shrinker"> <div class="b-shrinker__right">Right part</div> <div class="b-shrinker__left">Some very long string. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div> </div> <div class="b-shrinker"> <div class="b-shrinker__right">Right part</div> <div class="b-shrinker__left">Short string</div> </div> <div class="b-shrinker"> <div class="b-shrinker__left">Short string, no right part</div> </div> <div class="b-shrinker"> <div class="b-shrinker__right">Long, long, long right part</div> <div class="b-shrinker__left">Short string</div> </div> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ // alert('Hello world!'); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}