Skip to content

Commit

Permalink
fix(css): inline CSS in the component
Browse files Browse the repository at this point in the history
  • Loading branch information
Riron committed Aug 12, 2016
1 parent 9da74eb commit 7371ac2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "ionic-img-viewer.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "tsc && node-sass ./src/image-viewer.scss ./src/image-viewer.css"
"prepublish": "tsc && node ./scripts"
},
"typings": "./ionic-img-viewer.d.ts",
"repository": {
Expand Down Expand Up @@ -33,6 +33,7 @@
"zone.js": "^0.6.12"
},
"devDependencies": {
"clean-css": "^3.4.19",
"node-sass": "^3.8.0",
"typescript": "^1.8.10",
"typings": "^1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion src/image-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DOUBLE_TAP_INTERVAL = 300;
</div>
</div>
`,
styleUrls: ['image-viewer.css']
styles: ['$IONIC_STYLE_HACK']
})
export class ImageViewerComponent extends Ion implements OnInit, OnDestroy {
private d: {cssClass: string};
Expand Down
2 changes: 1 addition & 1 deletion src/image-viewer.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image-viewer {
:host {
position: absolute;
top: 0;
right: 0;
Expand Down

0 comments on commit 7371ac2

Please sign in to comment.