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

Margin: 0 auto #38

Closed
EKhots opened this issue Aug 28, 2020 · 0 comments
Closed

Margin: 0 auto #38

EKhots opened this issue Aug 28, 2020 · 0 comments

Comments

@EKhots
Copy link

EKhots commented Aug 28, 2020

Thanks for fixing the previous issue!

New one:

.t228__maincontainer.t228__c12collumns{max-width:1200px;margin:0 auto}`

Result:

.t228__maincontainer.t228__c12collumns { max-width: 1200px; margin-top: 0 auto; margin-right: 0 auto; margin-bottom: 0 auto; margin-left: 0 auto }

Is wrong:

margin-top: 0 auto;
margin-right: 0 auto;
margin-bottom: 0 auto;
margin-left: 0 auto;

Correct:

margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;

Option:

'allow_duplicate_declarations' => false

Fix.

File: Renderer.php

After:

if ($value == 'none' && in_array($name, ['border', 'border-top', 'border-right', 'border-left', 'border-bottom', 'outline'])) {

Something like:

        if ($value == '0 auto' && in_array($name, ['margin-top', 'margin-right', 'margin-left', 'margin-bottom']) ) {
            if($name == 'margin-top' || $name == 'margin-bottom'){
                $value = 0;
            }else{
                $value = 'auto';
            }
        }
        if ($value == 'auto 0' && in_array($name, ['margin-top', 'margin-right', 'margin-left', 'margin-bottom']) ) {
            if($name == 'margin-left' || $name == 'margin-right'){
                $value = 'auto';
            }else{
                $value = 0;
            }
        }
@EKhots EKhots changed the title Margin: auto Margin: 0 auto Aug 28, 2020
tbela99 added a commit that referenced this issue Aug 30, 2020
tbela99 added a commit that referenced this issue Aug 30, 2020
@tbela99 tbela99 closed this as completed Aug 30, 2020
tbela99 added a commit that referenced this issue Sep 9, 2021
a lot of issues fixed

- backporting to php5.6-php7.3 9321aca
- Merge branch 'v.next' into php56-backport 8680260
- fix merge conflict 22a4c8d
- update php required version 9913c86
- Merge branch 'v.next' into php56-backport 536fa7b
- merge upstream changes 21311dd
- fix composer autoload 8b5b3a5
- specify media query while loading a file 49fe926
- revert remove whitespace afb0079
- Merge branch 'v.next' into php56-backport 5dd4ce9
- fix php compatibility with PHP < 7.4 029e5f0
- parse using plain objects to improve speed e9ef96a
- Merge branch 'v.next' into php56-backport 762226f
- update from v.next 68c018a
- Merge branch 'v.next' into php56-backport 8473be8
- Merge branch 'v.next' into php56-backport 6866269
- 3x faster parser b8cba17
- merge rendering improvement f6dda3e
- add missing files 34f0177
- fix broken composer.json 7c3b032
- fix invalid composer.json cd7fb8a
- update docs 1aec9c2
- fix merge issues 41d94fc
- Update composer.json 42df626
- Merge branch 'v.next' into php56-backport b9c54d9
- Merge branch 'php56-backport' of https://github.com/tbela99/css into … f8066fa
- Merge branch 'v.next' into php56-backport 59f619d
- fix typo 8125a49
- update install instructions 008dfbb
- Merge branch 'data_uri' into php56-backport bf04e87
- fix compatibility issue b830dfc
- Merge branch 'php56-backport' of https://github.com/tbela99/css into … 65c23d6
- change version number 36b9fad
- do not expand shorthand properties #38 6ec21fe
- Merge branch 'data_uri' into php56-backport 0d747ec
- preserve quotes around font-src format #39 34b7bc3
- backport fix in #40 f61bf62
- Merge branch 'data_uri' into php56-backport 6286515
- fix parsing css function #42 8e01a49
- Merge branch 'operators' into php56-backport 790deaf
- backport changes from #42 cc7cc8c
- backport changes #42 c3e6168
- Merge branch 'operators' into php56-backport e3531eb
- backport changes from #35 32eebc3
- fix php5 compatibility issues #34 ed0b4e4
- Merge branch 'v.next' into php56-backport deb04d0
- a better way to detect the installed php5 version #35 84ff080
- Merge branch 'v.next' into php56-backport c673838
- backport changes #48 9d51cd9
- Merge branch 'v.next' into php56-backport 62a9d6d
- Merge branch 'v.next' into php56-backport 7f2d1f9
- backport fixes 657495a
- Merge branch 'v.next' into php56-backport b247cbc
- backport changes from #53 d4d493f
- Merge branch 'v.next' into php56-backport ccb7abc
- Merge branch 'v.next' into php56-backport a643251
- Merge branch 'v.next' into php56-backport 0039444
- backport changes 60c0cb5
- backport changes 22b5c2c
- backport changes #56 1b40c5d
- backport changes #56 aadea0b
- #61 search nodes by class name 6a81438
- Merge branch 'v.next' into php56-backport c3b7499
- Merge branch 'v.next' into php56-backport c479392
- fix fatal error when rendering Ast 144c4b7
- Merge branch 'license_comments' into php56-backport dc483b5
- \#66 preserve license comments ae75464
- backport #67 and #68 4adb726
- Merge branch 'v.next' into php56-backport-next 281b752
- backport changes #67 d078dc1
- #67 backport changes b690934
- Merge branch 'v.next' into php56-backport-next 9fbe682
- backport changes ba8f137
- Merge branch 'v.next' into php56-backport-next 5c4992c
- add benchmark script #67 0de9c08
- Merge branch 'v.next' into php56-backport-next 06038a9
- fix merge conflict 09578cb
- add sourcemap generation 152d850
- always failing 8c86a81
- #69 compute background properties e329e65
- #69 backport changes 6bead3f
- Merge branch 'background_shorthand' into php56-backport 73c81f9
- Merge branch 'background_shorthand' into php56-backport 65bf2eb
- Merge branch 'background_shorthand' into php56-backport 13abc17
- Merge branch 'background_shorthand' into php56-backport cded149
- #69 compute background property shorthand 533df47
- #69 fix invalid composer.json 879605b
- Merge branch 'background_shorthand' into php56-backport e5d17da
- merge from master 902f60a
- Merge branch 'git_attributes_exlude' into php56-backport 89c4d16
- Merge branch 'git_attributes_exlude' into php56-backport 7873196
- fix fatal error #81 22e06f4
- #82 parse css variables 2f8b5f2
- Merge branch 'v.next' into php56-backport-dev 0813a24
- #83 fatal error when $ast->children is NULL a1de00d
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

2 participants