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

[ControlGroup] Give border radius to :only-child #2734

Merged
merged 2 commits into from
Jul 30, 2018

Conversation

badams
Copy link
Contributor

@badams badams commented Jul 29, 2018

Currently when a ControlGroup only has a single child component the :last-child border rules are applied.

<ControlGroup>
    <Button icon="filter">Filter</Button>
</ControlGroup>

Screenshot

Before:
screen shot 2018-07-30 at 9 31 29 am

After:
screen shot 2018-07-30 at 9 31 07 am

@giladgray
Copy link
Contributor

@badams please fix the build. if you've configured it already then you might need to push new commits.

@@ -189,6 +189,12 @@ Styleguide control-group
border-radius: 0 $pt-border-radius $pt-border-radius 0;
}

// round all the corners of the only child element
> :only-child {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well color me 😱 i did not know this pseudoselector existed!
and it's always been there. https://developer.mozilla.org/en-US/docs/Web/CSS/:only-child

@giladgray giladgray merged commit 5922413 into palantir:develop Jul 30, 2018
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

Successfully merging this pull request may close these issues.

2 participants