Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for cascading classes #544

Merged
merged 1 commit into from Aug 16, 2013

Conversation

Projects
None yet
2 participants
Contributor

amro commented Aug 16, 2013

Hi Oliver. I needed support for cascading css classes so I wrote the code to do it. I'm not sure what might be an applicable unit test for this but my test case was the following markup:

<head>
    <style>
        .foo .bar {
            font-size: 25pt;
        }

        .foo .bar .bing {
            color: green;
        }

        .foo .bing {
            font-weight: bold;
        }

        .bar .bing {
            text-decoration: underline;
        }
        .zing {
            color:orange;
        }
        .bar .zing {
            font-style:italic;
        }
    </style>
</head>
<body>
    <div class="foo">
        <div>
            <div class="bar">
                <div class="bing">
                    me
                    <span class="zing">ow</span>
                </div>
                <span style="color:red;">Me<span class="bing">ow</span></span>
            </div>
        </div>
    </div>
</body>
</html>

which yielded the following fabulous output:

screen shot 2013-08-15 at 11 36 32 pm

Collaborator

odrobnik commented Aug 16, 2013

Exactly the thing you used for your testing would make a perfect unit test. Can you add it, or should I?

@ghost ghost assigned odrobnik Aug 16, 2013

odrobnik added a commit that referenced this pull request Aug 16, 2013

@odrobnik odrobnik merged commit b312cb4 into Cocoanetics:develop Aug 16, 2013

odrobnik added a commit that referenced this pull request Aug 16, 2013

odrobnik added a commit that referenced this pull request Aug 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment