Skip to content

Commit

Permalink
Merge pull request #38 from openstax/fix/post-elsa
Browse files Browse the repository at this point in the history
Fix styles to be wrapped and not conflict with parents
  • Loading branch information
philschatz committed Dec 4, 2015
2 parents a5812fe + d4f2abe commit 3b829da
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"keymaster": "^1.6.2",
"lodash": "^3.10.1",
"moment": "^2.9.0",
"openstax-react-components": "openstax/react-components#0b8076d20de1964025a76df4f45256a1ef7c40fc",
"openstax-react-components": "openstax/react-components#dbd0ddb0120920b12210d8c2266747f407bc308a",
"underscore": "~1.8.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions resources/styles/components/concept-coach/breadcrumbs.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
margin: 1rem 0;
}

.task-breadcrumbs-step {
.openstax-breadcrumbs-step {
border-width: 2px;
border-style: solid;
border-radius: @concept-coach-breadcrumb-border-radius;
Expand Down Expand Up @@ -81,7 +81,7 @@
.task-practice,
.task-chapter_practice,
.task-page_practice {
.task-breadcrumbs-step {
.openstax-breadcrumbs-step {
width: auto;
position: relative;

Expand Down
2 changes: 1 addition & 1 deletion resources/styles/components/exercise/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
left: @concept-coach-base-y-padding - 27px;
top: @concept-coach-base-x-padding;

.exercise();
.exercise-typography();
}
}
4 changes: 2 additions & 2 deletions resources/styles/components/shared.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
i.close-icon {
.fa;
.fa-3x;
.fa();
.fa-3x();
cursor: pointer;
// position pointer to the top right of content
float: right;
Expand Down
2 changes: 2 additions & 0 deletions resources/styles/demo.less
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@import '~openstax-react-components/resources/styles/main';
@import "@{bootstrap-path}/jumbotron";
@import "@{bootstrap-path}/navs";
@import "@{bootstrap-path}/navbar";
13 changes: 6 additions & 7 deletions resources/styles/main.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
@import '~openstax-react-components/resources/styles/no-conflict';
@import './components/concept-coach/modal-opened';

// All styles are included inside the wrapper selector
// This ensures CC specific styles do not alter
// the appearance of the website that's embedding CC
.concept-coach-wrapper {
width: 100%;
height: 100%;

@import '~openstax-react-components/resources/styles/main';
@import './components/shared';
@import "@{bootstrap-path}/variables";

// @import './components/shared';
@import './components/concept-coach/index';
@import './components/navigation/index';
@import './components/task/index';
Expand All @@ -16,11 +20,6 @@
@import './components/course/index';
@import './components/user/index';

@import "@{bootstrap-path}/navs";
@import "@{bootstrap-path}/navbar";

@import './mixins';
@import './variables';
}
@import '~openstax-react-components/resources/styles/variables/colors';
@import './components/concept-coach/modal-opened';
2 changes: 1 addition & 1 deletion src/concept-coach/base.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ConceptCoach = React.createClass
className = classnames 'concept-coach-view', "concept-coach-view-#{view}",
loading: not (isLoggedIn or isLoaded)

<div className='concept-coach'>
<div className='concept-coach openstax-wrapper'>
<ErrorNotification />

<SpyMode.Wrapper>
Expand Down
2 changes: 1 addition & 1 deletion webpack-helper/configs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ base =
# new webpack.NormalModuleReplacementPlugin(/\/react\/lib\/cloneWithProps/, '../../react-clonewithprops/index.js')
# Pass the BASE_URL along
new webpack.EnvironmentPlugin( 'NODE_ENV', 'BASE_URL' )
new ExtractTextPlugin('main.css')
new ExtractTextPlugin('[name].css')
new webpack.optimize.DedupePlugin()
]

Expand Down
9 changes: 7 additions & 2 deletions webpack.config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@ getWebpackConfig = (name, isProduction) ->
}, {isProduction}]
'demo': [{
entry:
demo: [
'demo.js': [
'./demo'
'./resources/styles/main.less'
]
'demo': [
'./resources/styles/demo.less'
]
'main': [
'./resources/styles/main.less'
]
output:
path: './assets/'
publicPath: './'
filename: '[name]'
}, {isProduction, minify: true}]

if configs[name]?
Expand Down

0 comments on commit 3b829da

Please sign in to comment.