Skip to content

Commit

Permalink
Use "cursor: pointer" for buttons for web target
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek authored and mrtcode committed Aug 15, 2023
1 parent 433bba3 commit f24d69e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/common/stylesheets/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ textarea {
display: none !important;
}

button:hover {
cursor: default;
@if $platform != "web" {
button:hover {
cursor: default;
}
}


Expand Down
5 changes: 4 additions & 1 deletion src/common/stylesheets/components/_annotations-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
}

.tag {
cursor: default;
overflow: hidden;
text-overflow: ellipsis;
white-space: pre;
Expand All @@ -136,6 +135,10 @@
border-radius: 6px;
border: 1px solid transparent;

@if $platform != 'web' {
cursor: default;
}

&.color {
font-weight: bold;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/stylesheets/components/_findbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
}
}

@if $platform == "darwin" {
@if $platform == "darwin" or $platform == "web" {
#findPrevious {
padding-left: 4px;
padding-right: 5px;
Expand Down
2 changes: 1 addition & 1 deletion src/common/stylesheets/components/_toolbar-buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
}
}

@if $platform == "darwin" {
@if $platform == "darwin" or $platform =="web" {
@include split-button(
$height: 24px,
$button: "menubutton",
Expand Down
2 changes: 1 addition & 1 deletion src/common/stylesheets/components/_toolbar-sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
flex: 1 0 auto;
margin: $toolbar-sidebar-btn-margin;

@if $platform == "darwin" {
@if $platform == "darwin" or $platform =="web" {
@include split-button(
$height: $split-toolbar-btn-height,
$button: "sidebarbutton",
Expand Down
2 changes: 1 addition & 1 deletion src/common/stylesheets/components/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
}
}

@if $platform == "darwin" {
@if $platform == "darwin" or $platform =="web" {
#zoomOut,
#previous {
margin-inline-end: 1px;
Expand Down
6 changes: 5 additions & 1 deletion src/common/stylesheets/components/_viewer-override.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ button {
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
display: block;

@if $platform == "web" {
&:not([disabled]) {
cursor: pointer;
}
}

&:focus-visible {
//border: $search-focus-border;
Expand Down
2 changes: 1 addition & 1 deletion src/common/stylesheets/darwin.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$platform: "darwin";
$platform: "darwin" !default;
$theme: "light";
$mode: "production" !default;

Expand Down
4 changes: 4 additions & 0 deletions src/common/stylesheets/web.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$mode: "production";
$platform: "web";

@import "darwin";
5 changes: 4 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ function generateReaderConfig(build) {
mode: build === 'dev' ? 'development' : 'production',
devtool: build === 'zotero' ? false : 'source-map',
entry: {
reader: ['./src/index.' + build + '.js', './src/common/stylesheets/main.scss']
reader: [
'./src/index.' + build + '.js',
(build === 'web' ? './src/common/stylesheets/web.scss' : './src/common/stylesheets/main.scss')
]
},
output: {
path: path.resolve(__dirname, './build/' + build),
Expand Down

0 comments on commit f24d69e

Please sign in to comment.