Skip to content

Commit

Permalink
feat(scroller): add fluent styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Juveniel committed Sep 5, 2022
1 parent a9f1359 commit 640c9f1
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/fluent/scss/index.scss
Expand Up @@ -148,7 +148,7 @@
@use "mediaplayer";
// @use "timeline";
// @use "pdf-viewer";
// @use "scroller";
@use "scroller";
// @use "scrollview";


Expand All @@ -166,11 +166,9 @@
// Typography and utils
@include typography.styles();
@include utils.styles();
// @include cursor.styles();


// Generic content
// @include styling.styles();
@include icon.styles();
@include messagebox.styles();

Expand Down Expand Up @@ -310,7 +308,7 @@
@include mediaplayer.styles();
// @include timeline.styles();
// @include pdf-viewer.styles();
// @include scroller.styles();
@include scroller.styles();
// @include scrollview.styles();


Expand Down
84 changes: 84 additions & 0 deletions packages/fluent/scss/scroller/_layout.scss
@@ -0,0 +1,84 @@
@use "_variables.scss" as *;

@mixin kendo-scroller--layout() {

// Layout
.km-scrollview,
.km-scroll-container {
user-select: none;
border-collapse: separate;
}
.km-scroll-wrapper {
position: relative;
}
.km-scroll-header {
position: absolute;
z-index: 1001;
width: 100%;
top: 0;
left: 0;
}


// Pull to refresh
.km-scroller-pull {
width: 100%;
display: block;
position: absolute;
line-height: 3em;
font-size: 1.4em;
text-align: center;
transform: translate3d(0, -3em, 0);
}
.km-scroller-pull .km-template {
display: inline-block;
min-width: 200px;
text-align: left;
}
.km-load-more .km-icon,
.km-widget .km-scroller-pull .km-icon {
display: inline-block;
height: 2rem;
margin-right: 1rem;
vertical-align: middle;
width: 2rem;
font-size: 2rem;
transform: rotate(0deg);
transition: transform 300ms linear;
}
.km-widget .km-scroller-release .km-icon {
transform: rotate(180deg);
}
.km-widget .km-scroller-refresh .km-icon {
transition: none;
}


// Scrollbar
.km-touch-scrollbar {
position: absolute;
visibility: hidden;
z-index: 200000;
height: .4em;
width: .4em;
opacity: 0;
transform-origin: 0 0;
transition: opacity .3s linear;

.k-map &,
.k-diagram & {
display: none;
}
}
.km-vertical-scrollbar {
height: 100%;
right: 2px;
top: 0;
}
.km-horizontal-scrollbar {
width: 100%;
left: 0;
bottom: 2px;
}

}
8 changes: 8 additions & 0 deletions packages/fluent/scss/scroller/_theme.scss
@@ -0,0 +1,8 @@
@use "_variables.scss" as *;

@mixin kendo-scroller--theme() {

.km-touch-scrollbar {
background-color: #333333;
}
}
1 change: 1 addition & 0 deletions packages/fluent/scss/scroller/_variables.scss
@@ -0,0 +1 @@
@use "../core/color-system" as *;
23 changes: 23 additions & 0 deletions packages/fluent/scss/scroller/index.scss
@@ -0,0 +1,23 @@
// Module meta
$_kendo-module-meta: (
name: "scroller",
dependencies: ()
);


// Component
@forward "_variables.scss";
@use "_layout.scss" as *;
@use "_theme.scss" as *;

// Register
@use "../core/module-system/" as module;
@include module.register( $_kendo-module-meta... );

// Expose
@mixin styles() {
@include module.render( "scroller" ) {
@include kendo-scroller--layout();
@include kendo-scroller--theme();
}
}

0 comments on commit 640c9f1

Please sign in to comment.