Skip to content

Commit

Permalink
css fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
LesageYann committed Mar 2, 2022
1 parent 0a43c26 commit 4ad420f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
9 changes: 1 addition & 8 deletions src/Material-Design-Lite-Extensions/MDLFoldButton.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
'divId',
'isFolded'
],
#category : 'Material-Design-Lite-Extensions-Panels'
#category : #'Material-Design-Lite-Extensions-Panels'
}

{ #category : #'instance creation' }
Expand Down Expand Up @@ -112,13 +112,6 @@ MDLFoldButton >> renderContentOn: html [
ifTrue: [ html document addLoadScript: ('document.getElementById(''' , self divId allButFirst , ''').style.width=''0'';' , self onCompleteScript) js ]
]

{ #category : #options }
MDLFoldButton >> resetVisusOnFold [
self
onCompleteScript:
'setTimeout(function(){for(i=0;i<visus.length;i++)visus[i].visu.resize();for(i=0;i<visus.length;i++)visus[i].visu.fit();}, 1000)'
]

{ #category : #javascript }
MDLFoldButton >> showAndHide [
^ ('$(".visualization").children().width(0);if(this.dataset.fold=="false"){this.dataset.fold="true";$(this.dataset.for)[0].style.width="0";}else{this.dataset.fold="false";$(this.dataset.for)[0].style.width="";};'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This trait need to be used by the root component of the application.
Trait {
#name : #TRootDialogRenderer,
#traits : 'TWithRootDialogComponent',
#classTraits : 'TWithRootDialogComponent classTrait',
#category : 'Material-Design-Lite-Extensions-RootDialog'
}

Expand Down
21 changes: 19 additions & 2 deletions src/Material-Design-Lite-Utils/MDLLibrary.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,23 @@ if hash sass 2>/dev/null; then
'
]

{ #category : #css }
MDLLibrary >> customCss [
^ '.nestedList .listContent .listContainer .nested-item {
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-flex-grow: 1;
flex-grow: 1;
color: rgba(0, 0, 0, .87);
text-decoration: none;
white-space: nowrap;
cursor: pointer;
width: 0
}'
]

{ #category : #polyfill }
MDLLibrary >> dialogpolyfillminCss [
^ 'dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:white;color:black;display:none}dialog[open]{display:block}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.1)}@media screen and (max-width:540px){dialog[_polyfill_modal]{top:0;width:auto;margin:1em}}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}'
Expand Down Expand Up @@ -276,7 +293,7 @@ MDLLibrary >> iconCss [
font-family: ''Material Icons'';
font-style: normal;
font-weight: 400;
src: url(', self urlOf: 'MaterialIconsRegular.woff2' , ') format(''woff2'');
src: url(/files/MDLLibrary/MaterialIconsRegular.woff2) format(''woff2'');
}

.material-icons {
Expand Down Expand Up @@ -1061,7 +1078,7 @@ MDLLibrary >> selectSass [

{ #category : #accessing }
MDLLibrary >> selectorsToInclude [
^ #(#materialdesignCss #nestedListJs #mdlDialogJs #getmdlselectminJs #iconCss #materialminJs #dialogpolyfillminCss #dialogpolyfillminJs #robotoCss #panelsJs)
^ #(#materialdesignCss #nestedListJs #mdlDialogJs #getmdlselectminJs #iconCss #materialminJs #dialogpolyfillminCss #dialogpolyfillminJs #robotoCss #panelsJs #customCss)
]

{ #category : #sass }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ MDLNestedListItemRenderAjaxStrategy >> asAjaxStrategy [
{ #category : #'as yet unclassified' }
MDLNestedListItemRenderAjaxStrategy >> getHtmlElementForNode: aNode inDiv: div index: anIndex indentedBy: anInteger on: html [
^ html div
class: #'nested-item';
onClick: (self actionBlock cull: aNode element cull: html)
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ MDLNestedListItemRenderAnchorStrategy >> asAjaxStrategy [
{ #category : #'as yet unclassified' }
MDLNestedListItemRenderAnchorStrategy >> getHtmlElementForNode: aNode inDiv: div index: anIndex indentedBy: anInteger on: html [
| anchor |
anchor := html anchor.
anchor := html anchor
class: #'nested-item';
yourself.
self actionBlock
ifNotNil: [ self isJsAction
ifTrue: [ anchor
Expand Down

0 comments on commit 4ad420f

Please sign in to comment.