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

change CSS namespace to bp3 #2441

Merged
merged 3 commits into from
May 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions packages/core/src/_reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
// Licensed under the terms of the LICENSE file distributed with this project.

@import "common/variables";
@import "common/mixins";

// Style resets on top of Normalize.css


body {
@include base-typography();
color: $pt-text-color;
}

p {
margin-top: 0;
margin-bottom: $pt-grid-size;
}

small {
font-size: $pt-font-size-small;
}

strong {
font-weight: 600;
Copy link
Contributor

Choose a reason for hiding this comment

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

👌 thanks

}

// consistent cross-browser text selection
::selection {
background: $pt-text-selection-color;
}
26 changes: 6 additions & 20 deletions packages/core/src/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,16 @@
@import "common/mixins";
@import "~@blueprintjs/icons/src/icons";

// consistent cross-browser text selection
::selection {
background: $pt-text-selection-color;
}

body {
@include base-typography();
color: $pt-text-color;
}

small {
font-size: $pt-font-size-small;
}

/*
Headings

Markup:
<h1 class="pt-heading">H1 heading</h1>
<h2 class="pt-heading">H2 heading</h2>
<h3 class="pt-heading">H3 heading</h3>
<h4 class="pt-heading">H4 heading</h4>
<h5 class="pt-heading">H5 heading</h5>
<h6 class="pt-heading">H6 heading</h6>
<h1 class="@ns-heading">H1 heading</h1>
<h2 class="@ns-heading">H2 heading</h2>
<h3 class="@ns-heading">H3 heading</h3>
<h4 class="@ns-heading">H4 heading</h4>
<h5 class="@ns-heading">H5 heading</h5>
<h6 class="@ns-heading">H6 heading</h6>

Styleguide headings
*/
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/blueprint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Licensed under the terms of the LICENSE file distributed with this project.
@import "common/variables";
@import "common/colors";

@import "reset";
@import "typography";
@import "accessibility";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import "mixins";

// Namespace appended to the beginning of each CSS class: `.#{$ns}-button`.
$ns: "pt" !default;
$ns: "bp3" !default;

// easily the most important variable, so it comes up top
// (so other variables can use it to define themselves)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Elevation } from "../components/card/card";
import { Alignment } from "./alignment";
import { Intent } from "./intent";

const NS = process.env.BLUEPRINT_NAMESPACE || "pt";
const NS = process.env.BLUEPRINT_NAMESPACE || "bp3";

// modifiers
export const ACTIVE = `${NS}-active`;
Expand Down
3 changes: 1 addition & 2 deletions packages/icons/src/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
@import "generated/icon-variables";
@import "generated/icon-map";

$pt-namespace: "pt" !default;
$ns: $pt-namespace;
$ns: "bp3" !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not import that from core? how does it work for other packages that contain CSS?

Copy link
Contributor Author

@giladgray giladgray May 1, 2018

Choose a reason for hiding this comment

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

❌ other way around... core depends on icons!

Copy link
Contributor

Choose a reason for hiding this comment

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

oh right, I forget. is that tentatively changing to icons depends on core with tree-shaked SVG icons?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope no such plans. still core > icons


$icon-classes: (
".#{$ns}-icon",
Expand Down