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

Only apply styling to Bootstrap buttons #6610

Merged
merged 2 commits into from
Apr 1, 2024
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
9 changes: 0 additions & 9 deletions panel/dist/css/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,3 @@
:host(.bk-panel-models-widgets-FileDownload) .bk-btn .bk-TablerIcon {
margin-left: 0.5em;
}

input[type='file'].bk-input {
padding-left: 10px;
}

input[type='file']::file-selector-button {
background: var(--surface-color);
color: var(--surface-text-color);
}
9 changes: 9 additions & 0 deletions panel/theme/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,15 @@ textarea.bk-input {
--bs-btn-disabled-border-color: #212529;
}

input[type='file'].bk-input {
padding-left: 10px;
}

input[type='file']::file-selector-button {
background: var(--bs-surface-bg);
color: var(--bs-surface-color);
}

.bk-menu {
background-color: var(--bs-form-control-bg);
color: var(--bs-form-control-color);
Expand Down
7 changes: 2 additions & 5 deletions panel/widgets/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from base64 import b64decode
from datetime import date, datetime
from typing import (
TYPE_CHECKING, Any, ClassVar, Dict, Iterable, List, Mapping, Optional,
Tuple, Type,
TYPE_CHECKING, Any, ClassVar, Dict, Iterable, Mapping, Optional, Tuple,
Type,
)

import numpy as np
Expand All @@ -27,7 +27,6 @@
)

from ..config import config
from ..io.resources import CDN_DIST
from ..layout import Column, Panel
from ..models import (
DatetimePicker as _bkDatetimePicker, TextAreaInput as _bkTextAreaInput,
Expand Down Expand Up @@ -196,8 +195,6 @@ class FileInput(Widget):

_widget_type: ClassVar[Type[Model]] = _BkFileInput

_stylesheets: ClassVar[List[str]] = [f'{CDN_DIST}css/button.css']

def _process_param_change(self, msg):
msg = super()._process_param_change(msg)
if 'value' in msg:
Expand Down
Loading