Browse Source

Move content loader to new component, placeholder. Modify placeholder segment to be 'empty segment'

placeholder
Jack 6 years ago
parent
commit
e83855cdd3
31 changed files with 648 additions and 361 deletions
  1. 39
      dist/components/dimmer.js
  2. 2
      dist/components/dimmer.min.js
  3. 31
      dist/components/dropdown.js
  4. 2
      dist/components/dropdown.min.js
  5. 1
      dist/components/flag.css
  6. 2
      dist/components/flag.min.css
  7. 6
      dist/components/icon.css
  8. 2
      dist/components/icon.min.css
  9. 26
      dist/components/label.css
  10. 2
      dist/components/label.min.css
  11. 2
      dist/components/list.css
  12. 2
      dist/components/list.min.css
  13. 95
      dist/components/modal.js
  14. 2
      dist/components/modal.min.js
  15. 19
      dist/components/popup.js
  16. 2
      dist/components/popup.min.js
  17. 35
      dist/semantic.css
  18. 184
      dist/semantic.js
  19. 8
      dist/semantic.min.css
  20. 2
      dist/semantic.min.js
  21. 189
      src/definitions/elements/loader.less
  22. 213
      src/definitions/elements/placeholder.less
  23. 38
      src/definitions/elements/segment.less
  24. 1
      src/theme.config.example
  25. 39
      src/themes/default/elements/loader.variables
  26. 3
      src/themes/default/elements/placeholder.overrides
  27. 49
      src/themes/default/elements/placeholder.variables
  28. 10
      src/themes/default/elements/segment.variables
  29. 1
      tasks/config/admin/release.js
  30. 1
      tasks/config/defaults.js
  31. 1
      tasks/config/project/install.js

39
dist/components/dimmer.js

@ -83,7 +83,6 @@ $.fn.dimmer = function(parameters) {
else {
$dimmer = module.create();
}
module.set.variation();
}
},
@ -114,10 +113,6 @@ $.fn.dimmer = function(parameters) {
bind: {
events: function() {
if(module.is.page()) {
// touch events default to passive, due to changes in chrome to optimize mobile perf
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
}
if(settings.on == 'hover') {
$dimmable
.on('mouseenter' + eventNamespace, module.show)
@ -145,9 +140,6 @@ $.fn.dimmer = function(parameters) {
unbind: {
events: function() {
if(module.is.page()) {
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
}
$module
.removeData(moduleNamespace)
;
@ -165,9 +157,6 @@ $.fn.dimmer = function(parameters) {
event.stopImmediatePropagation();
}
},
preventScroll: function(event) {
event.preventDefault();
}
},
addContent: function(element) {
@ -200,6 +189,7 @@ $.fn.dimmer = function(parameters) {
: function(){}
;
module.debug('Showing dimmer', $dimmer, settings);
module.set.variation();
if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {
module.animate.show(callback);
settings.onShow.call(element);
@ -243,12 +233,22 @@ $.fn.dimmer = function(parameters) {
: function(){}
;
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
if(settings.useFlex) {
module.debug('Using flex dimmer');
module.remove.legacy();
}
else {
module.debug('Using legacy non-flex dimmer');
module.set.legacy();
}
if(settings.opacity !== 'auto') {
module.set.opacity();
}
$dimmer
.transition({
displayType : 'flex',
displayType : settings.useFlex
? 'flex'
: 'block',
animation : settings.transition + ' in',
queue : false,
duration : module.get.duration(),
@ -293,7 +293,9 @@ $.fn.dimmer = function(parameters) {
module.verbose('Hiding dimmer with css');
$dimmer
.transition({
displayType : 'flex',
displayType : settings.useFlex
? 'flex'
: 'block',
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
@ -302,6 +304,7 @@ $.fn.dimmer = function(parameters) {
module.remove.dimmed();
},
onComplete : function() {
module.remove.variation();
module.remove.active();
callback();
}
@ -415,6 +418,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Setting opacity to', opacity);
$dimmer.css('background-color', color);
},
legacy: function() {
$dimmer.addClass(className.legacy);
},
active: function() {
$dimmer.addClass(className.active);
},
@ -444,6 +450,9 @@ $.fn.dimmer = function(parameters) {
.removeClass(className.active)
;
},
legacy: function() {
$dimmer.removeClass(className.legacy);
},
dimmed: function() {
$dimmable.removeClass(className.dimmed);
},
@ -657,6 +666,9 @@ $.fn.dimmer.settings = {
verbose : false,
performance : true,
// whether should use flex layout
useFlex : true,
// name to distinguish between multiple dimmers in context
dimmerName : false,
@ -700,6 +712,7 @@ $.fn.dimmer.settings = {
dimmer : 'dimmer',
disabled : 'disabled',
hide : 'hide',
legacy : 'legacy',
pageDimmer : 'page',
show : 'show'
},

2
dist/components/dimmer.min.js
File diff suppressed because it is too large
View File

31
dist/components/dropdown.js

@ -1019,7 +1019,12 @@ $.fn.dropdown = function(parameters) {
},
icon: {
click: function(event) {
module.toggle();
if($icon.hasClass(className.clear)) {
module.clear();
}
else {
module.toggle();
}
}
},
text: {
@ -1646,7 +1651,7 @@ $.fn.dropdown = function(parameters) {
},
hide: function(text, value, element) {
module.set.value(value, text);
module.set.value(value, text, $(element));
module.hideAndClear();
}
@ -2481,6 +2486,15 @@ $.fn.dropdown = function(parameters) {
$module.data(metadata.value, stringValue);
}
}
if(module.is.single() && settings.clearable) {
// treat undefined or '' as empty
if(!escapedValue) {
module.remove.clearable();
}
else {
module.set.clearable();
}
}
if(settings.fireOnInit === false && module.is.initialLoad()) {
module.verbose('No callback on initial load', settings.onChange);
}
@ -2576,7 +2590,10 @@ $.fn.dropdown = function(parameters) {
}
})
;
}
},
clearable: function() {
$icon.addClass(className.clear);
},
},
add: {
@ -2774,7 +2791,7 @@ $.fn.dropdown = function(parameters) {
}
module.set.value(newValue, addedValue, addedText, $selectedItem);
module.check.maxSelections();
}
},
},
remove: {
@ -2999,6 +3016,9 @@ $.fn.dropdown = function(parameters) {
.removeAttr('tabindex')
;
}
},
clearable: function() {
$icon.removeClass(className.clear);
}
},
@ -3686,6 +3706,8 @@ $.fn.dropdown.settings = {
values : false, // specify values to use for dropdown
clearable : false, // whether the value of the dropdown can be cleared
apiSettings : false,
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
minCharacters : 0, // Minimum characters required to trigger API call
@ -3838,6 +3860,7 @@ $.fn.dropdown.settings = {
active : 'active',
addition : 'addition',
animating : 'animating',
clear : 'clear',
disabled : 'disabled',
empty : 'empty',
dropdown : 'ui dropdown',

2
dist/components/dropdown.min.js
File diff suppressed because it is too large
View File

1
dist/components/flag.css

@ -349,6 +349,7 @@ i.flag.gabon:before {
background-position: -36px 0px;
}
i.flag.gb:before,
i.flag.uk:before,
i.flag.united.kingdom:before {
background-position: -36px -26px;
}

2
dist/components/flag.min.css
File diff suppressed because it is too large
View File

6
dist/components/icon.css

@ -4427,11 +4427,11 @@ i.icon.window.minimize.outline:before {
i.icon.window.restore.outline:before {
content: "\f2d2";
}
i.icon.disk.outline:before {
content: "\f369";
}
/* Outline Aliases */
i.icon.disk.outline:before {
content: "\f0a0";
}
i.icon.heart.empty,
i.icon.star.empty {
font-family: 'outline-icons';

2
dist/components/icon.min.css
File diff suppressed because it is too large
View File

26
dist/components/label.css

@ -536,7 +536,7 @@ a.ui.red.label:hover {
/* Basic */
.ui.basic.red.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #DB2828 !important;
border-color: #DB2828 !important;
}
@ -577,7 +577,7 @@ a.ui.orange.label:hover {
/* Basic */
.ui.basic.orange.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #F2711C !important;
border-color: #F2711C !important;
}
@ -618,7 +618,7 @@ a.ui.yellow.label:hover {
/* Basic */
.ui.basic.yellow.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #FBBD08 !important;
border-color: #FBBD08 !important;
}
@ -659,7 +659,7 @@ a.ui.olive.label:hover {
/* Basic */
.ui.basic.olive.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #B5CC18 !important;
border-color: #B5CC18 !important;
}
@ -700,7 +700,7 @@ a.ui.green.label:hover {
/* Basic */
.ui.basic.green.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #21BA45 !important;
border-color: #21BA45 !important;
}
@ -741,7 +741,7 @@ a.ui.teal.label:hover {
/* Basic */
.ui.basic.teal.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #00B5AD !important;
border-color: #00B5AD !important;
}
@ -782,7 +782,7 @@ a.ui.blue.label:hover {
/* Basic */
.ui.basic.blue.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #2185D0 !important;
border-color: #2185D0 !important;
}
@ -823,7 +823,7 @@ a.ui.violet.label:hover {
/* Basic */
.ui.basic.violet.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #6435C9 !important;
border-color: #6435C9 !important;
}
@ -864,7 +864,7 @@ a.ui.purple.label:hover {
/* Basic */
.ui.basic.purple.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A333C8 !important;
border-color: #A333C8 !important;
}
@ -905,7 +905,7 @@ a.ui.pink.label:hover {
/* Basic */
.ui.basic.pink.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #E03997 !important;
border-color: #E03997 !important;
}
@ -946,7 +946,7 @@ a.ui.brown.label:hover {
/* Basic */
.ui.basic.brown.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A5673F !important;
border-color: #A5673F !important;
}
@ -987,7 +987,7 @@ a.ui.grey.label:hover {
/* Basic */
.ui.basic.grey.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #767676 !important;
border-color: #767676 !important;
}
@ -1028,7 +1028,7 @@ a.ui.black.label:hover {
/* Basic */
.ui.basic.black.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #1B1C1D !important;
border-color: #1B1C1D !important;
}

2
dist/components/label.min.css
File diff suppressed because it is too large
View File

2
dist/components/list.css

@ -141,12 +141,14 @@ ol.ui.list ol li,
.ui.list > .item > .image + .content,
.ui.list > .item > .icon + .content {
display: table-cell;
width: 100%;
padding: 0em 0em 0em 0.5em;
vertical-align: top;
}
.ui.list .list > .item > img.image + .content,
.ui.list > .item > img.image + .content {
display: inline-block;
width: auto;
}
.ui.list .list > .item > .content > .list,
.ui.list > .item > .content > .list {

2
dist/components/list.min.css
File diff suppressed because it is too large
View File

95
dist/components/modal.js

@ -110,8 +110,7 @@ $.fn.modal = function(parameters) {
debug : settings.debug,
variation : settings.centered
? false
: 'top aligned'
,
: 'top aligned',
dimmerName : 'modals'
},
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
@ -132,7 +131,7 @@ $.fn.modal = function(parameters) {
$dimmer = $dimmable.dimmer('get dimmer');
},
id: function() {
id = (Math.random().toString(16) + '000000000').substr(2,8);
id = (Math.random().toString(16) + '000000000').substr(2, 8);
elementEventNamespace = '.' + id;
module.verbose('Creating unique id for element', id);
}
@ -167,6 +166,9 @@ $.fn.modal = function(parameters) {
refresh: function() {
module.remove.scrolling();
module.cacheSizes();
if(!module.can.useFlex()) {
module.set.modalOffset();
}
module.set.screenHeight();
module.set.type();
},
@ -207,12 +209,22 @@ $.fn.modal = function(parameters) {
$window
.on('resize' + elementEventNamespace, module.event.resize)
;
},
scrollLock: function() {
// touch events default to passive, due to changes in chrome to optimize mobile perf
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
}
},
unbind: {
scrollLock: function() {
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
}
},
get: {
id: function() {
return (Math.random().toString(16) + '000000000').substr(2,8);
return (Math.random().toString(16) + '000000000').substr(2, 8);
}
},
@ -227,6 +239,9 @@ $.fn.modal = function(parameters) {
ignoreRepeatedEvents = false;
});
},
preventScroll: function(event) {
event.preventDefault();
},
deny: function() {
if(ignoreRepeatedEvents || settings.onDeny.call(element, $(this)) === false) {
module.verbose('Deny callback returned false cancelling hide');
@ -304,6 +319,8 @@ $.fn.modal = function(parameters) {
;
module.refreshModals();
module.set.dimmerSettings();
module.set.dimmerStyles();
module.showModal(callback);
},
@ -322,9 +339,16 @@ $.fn.modal = function(parameters) {
: function(){}
;
if( module.is.animating() || !module.is.active() ) {
module.showDimmer();
module.cacheSizes();
if(module.can.useFlex()) {
module.remove.legacy();
}
else {
module.set.legacy();
module.set.modalOffset();
module.debug('Using non-flex legacy modal positioning.');
}
module.set.screenHeight();
module.set.type();
module.set.clickaway();
@ -402,6 +426,7 @@ $.fn.modal = function(parameters) {
},
onComplete : function() {
settings.onHidden.call(element);
module.remove.dimmerStyles();
module.restore.focus();
callback();
}
@ -426,6 +451,7 @@ $.fn.modal = function(parameters) {
hideDimmer: function() {
if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
module.unbind.scrollLock();
$dimmable.dimmer('hide', function() {
module.remove.clickaway();
module.remove.screenHeight();
@ -513,11 +539,18 @@ $.fn.modal = function(parameters) {
active: function() {
$module.removeClass(className.active);
},
legacy: function() {
$module.removeClass(className.legacy);
},
clickaway: function() {
$dimmer
.off('click' + elementEventNamespace)
;
},
dimmerStyles: function() {
$dimmer.removeClass(className.inverted);
$dimmable.removeClass(className.blurring);
},
bodyStyle: function() {
if($body.attr('style') === '') {
module.verbose('Removing style attribute');
@ -546,11 +579,13 @@ $.fn.modal = function(parameters) {
$module.addClass(className.loading);
var
scrollHeight = $module.prop('scrollHeight'),
modalWidth = $module.outerWidth(),
modalHeight = $module.outerHeight()
;
if(module.cache === undefined || modalHeight !== 0) {
module.cache = {
pageHeight : $(document).outerHeight(),
width : modalWidth,
height : modalHeight + settings.offset,
scrollHeight : scrollHeight + settings.offset,
contextHeight : (settings.context == 'body')
@ -564,6 +599,12 @@ $.fn.modal = function(parameters) {
},
can: {
useFlex: function() {
return (settings.useFlex == 'auto')
? settings.detachable && !module.is.ie()
: settings.useFlex
;
},
fit: function() {
var
contextHeight = module.cache.contextHeight,
@ -585,6 +626,13 @@ $.fn.modal = function(parameters) {
active: function() {
return $module.hasClass(className.active);
},
ie: function() {
var
isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
isIE = ('ActiveXObject' in window)
;
return (isIE11 || isIE);
},
animating: function() {
return $module.transition('is supported')
? $module.transition('is animating')
@ -596,7 +644,7 @@ $.fn.modal = function(parameters) {
},
modernBrowser: function() {
// appName for IE11 reports 'Netscape' can no longer use
return !(window.ActiveXObject || "ActiveXObject" in window);
return !(window.ActiveXObject || 'ActiveXObject' in window);
}
},
@ -628,10 +676,10 @@ $.fn.modal = function(parameters) {
debug : settings.debug,
dimmerName : 'modals',
closable : 'auto',
useFlex : module.can.useFlex(),
variation : settings.centered
? false
: 'top aligned'
,
: 'top aligned',
duration : {
show : settings.duration,
hide : settings.duration
@ -644,6 +692,11 @@ $.fn.modal = function(parameters) {
? dimmerSettings.variation + ' inverted'
: 'inverted'
;
}
$context.dimmer('setting', dimmerSettings);
},
dimmerStyles: function() {
if(settings.inverted) {
$dimmer.addClass(className.inverted);
}
else {
@ -655,7 +708,21 @@ $.fn.modal = function(parameters) {
else {
$dimmable.removeClass(className.blurring);
}
$context.dimmer('setting', dimmerSettings);
},
modalOffset: function() {
var
width = module.cache.width,
height = module.cache.height
;
$module
.css({
marginTop: (settings.centered && module.can.fit())
? -(height / 2)
: 0,
marginLeft: -(width / 2)
})
;
module.verbose('Setting modal offset for legacy mode');
},
screenHeight: function() {
if( module.can.fit() ) {
@ -674,12 +741,17 @@ $.fn.modal = function(parameters) {
scrolling: function() {
$dimmable.addClass(className.scrolling);
$module.addClass(className.scrolling);
module.unbind.scrollLock();
},
legacy: function() {
$module.addClass(className.legacy);
},
type: function() {
if(module.can.fit()) {
module.verbose('Modal fits on screen');
if(!module.others.active() && !module.others.animating()) {
module.remove.scrolling();
module.bind.scrollLock();
}
}
else {
@ -880,6 +952,9 @@ $.fn.modal.settings = {
name : 'Modal',
namespace : 'modal',
useFlex : 'auto',
offset : 0,
silent : false,
debug : false,
verbose : false,
@ -909,7 +984,6 @@ $.fn.modal.settings = {
queue : false,
duration : 500,
offset : 0,
transition : 'scale',
// padding with edge of page
@ -949,6 +1023,7 @@ $.fn.modal.settings = {
animating : 'animating',
blurring : 'blurring',
inverted : 'inverted',
legacy : 'legacy',
loading : 'loading',
scrolling : 'scrolling',
undetached : 'undetached'

2
dist/components/modal.min.js
File diff suppressed because it is too large
View File

19
dist/components/popup.js

@ -1012,12 +1012,12 @@ $.fn.popup = function(parameters) {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
module.bind.closeOnScroll();
}
if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
if(settings.on == 'click' && settings.closable) {
if(module.is.closable()) {
module.bind.clickaway();
}
else if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
},
closeOnScroll: function() {
module.verbose('Binding scroll close event to document');
@ -1073,10 +1073,19 @@ $.fn.popup = function(parameters) {
should: {
centerArrow: function(calculations) {
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
}
},
},
is: {
closable: function() {
if(settings.closable == 'auto') {
if(settings.on == 'hover') {
return false;
}
return true;
}
return settings.closable;
},
offstage: function(distanceFromBoundary, position) {
var
offstage = []

2
dist/components/popup.min.js
File diff suppressed because it is too large
View File

35
dist/semantic.css

@ -5974,6 +5974,7 @@ i.flag.gabon:before {
}
i.flag.gb:before,
i.flag.uk:before,
i.flag.united.kingdom:before {
background-position: -36px -26px;
}
@ -13425,12 +13426,12 @@ i.icon.window.restore.outline:before {
content: "\f2d2";
}
/* Outline Aliases */
i.icon.disk.outline:before {
content: "\f369";
content: "\f0a0";
}
/* Outline Aliases */
i.icon.heart.empty,
i.icon.star.empty {
font-family: 'outline-icons';
@ -15279,7 +15280,7 @@ a.ui.red.label:hover {
/* Basic */
.ui.basic.red.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #DB2828 !important;
border-color: #DB2828 !important;
}
@ -15325,7 +15326,7 @@ a.ui.orange.label:hover {
/* Basic */
.ui.basic.orange.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #F2711C !important;
border-color: #F2711C !important;
}
@ -15371,7 +15372,7 @@ a.ui.yellow.label:hover {
/* Basic */
.ui.basic.yellow.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #FBBD08 !important;
border-color: #FBBD08 !important;
}
@ -15417,7 +15418,7 @@ a.ui.olive.label:hover {
/* Basic */
.ui.basic.olive.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #B5CC18 !important;
border-color: #B5CC18 !important;
}
@ -15463,7 +15464,7 @@ a.ui.green.label:hover {
/* Basic */
.ui.basic.green.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #21BA45 !important;
border-color: #21BA45 !important;
}
@ -15509,7 +15510,7 @@ a.ui.teal.label:hover {
/* Basic */
.ui.basic.teal.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #00B5AD !important;
border-color: #00B5AD !important;
}
@ -15555,7 +15556,7 @@ a.ui.blue.label:hover {
/* Basic */
.ui.basic.blue.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #2185D0 !important;
border-color: #2185D0 !important;
}
@ -15601,7 +15602,7 @@ a.ui.violet.label:hover {
/* Basic */
.ui.basic.violet.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #6435C9 !important;
border-color: #6435C9 !important;
}
@ -15647,7 +15648,7 @@ a.ui.purple.label:hover {
/* Basic */
.ui.basic.purple.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A333C8 !important;
border-color: #A333C8 !important;
}
@ -15693,7 +15694,7 @@ a.ui.pink.label:hover {
/* Basic */
.ui.basic.pink.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #E03997 !important;
border-color: #E03997 !important;
}
@ -15739,7 +15740,7 @@ a.ui.brown.label:hover {
/* Basic */
.ui.basic.brown.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A5673F !important;
border-color: #A5673F !important;
}
@ -15785,7 +15786,7 @@ a.ui.grey.label:hover {
/* Basic */
.ui.basic.grey.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #767676 !important;
border-color: #767676 !important;
}
@ -15831,7 +15832,7 @@ a.ui.black.label:hover {
/* Basic */
.ui.basic.black.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #1B1C1D !important;
border-color: #1B1C1D !important;
}
@ -16284,6 +16285,7 @@ ol.ui.list ol li,
.ui.list > .item > .image + .content,
.ui.list > .item > .icon + .content {
display: table-cell;
width: 100%;
padding: 0em 0em 0em 0.5em;
vertical-align: top;
}
@ -16291,6 +16293,7 @@ ol.ui.list ol li,
.ui.list .list > .item > img.image + .content,
.ui.list > .item > img.image + .content {
display: inline-block;
width: auto;
}
.ui.list .list > .item > .content > .list,

184
dist/semantic.js

@ -3734,7 +3734,6 @@ $.fn.dimmer = function(parameters) {
else {
$dimmer = module.create();
}
module.set.variation();
}
},
@ -3765,10 +3764,6 @@ $.fn.dimmer = function(parameters) {
bind: {
events: function() {
if(module.is.page()) {
// touch events default to passive, due to changes in chrome to optimize mobile perf
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
}
if(settings.on == 'hover') {
$dimmable
.on('mouseenter' + eventNamespace, module.show)
@ -3796,9 +3791,6 @@ $.fn.dimmer = function(parameters) {
unbind: {
events: function() {
if(module.is.page()) {
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
}
$module
.removeData(moduleNamespace)
;
@ -3816,9 +3808,6 @@ $.fn.dimmer = function(parameters) {
event.stopImmediatePropagation();
}
},
preventScroll: function(event) {
event.preventDefault();
}
},
addContent: function(element) {
@ -3851,6 +3840,7 @@ $.fn.dimmer = function(parameters) {
: function(){}
;
module.debug('Showing dimmer', $dimmer, settings);
module.set.variation();
if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {
module.animate.show(callback);
settings.onShow.call(element);
@ -3894,12 +3884,22 @@ $.fn.dimmer = function(parameters) {
: function(){}
;
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
if(settings.useFlex) {
module.debug('Using flex dimmer');
module.remove.legacy();
}
else {
module.debug('Using legacy non-flex dimmer');
module.set.legacy();
}
if(settings.opacity !== 'auto') {
module.set.opacity();
}
$dimmer
.transition({
displayType : 'flex',
displayType : settings.useFlex
? 'flex'
: 'block',
animation : settings.transition + ' in',
queue : false,
duration : module.get.duration(),
@ -3944,7 +3944,9 @@ $.fn.dimmer = function(parameters) {
module.verbose('Hiding dimmer with css');
$dimmer
.transition({
displayType : 'flex',
displayType : settings.useFlex
? 'flex'
: 'block',
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
@ -3953,6 +3955,7 @@ $.fn.dimmer = function(parameters) {
module.remove.dimmed();
},
onComplete : function() {
module.remove.variation();
module.remove.active();
callback();
}
@ -4066,6 +4069,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Setting opacity to', opacity);
$dimmer.css('background-color', color);
},
legacy: function() {
$dimmer.addClass(className.legacy);
},
active: function() {
$dimmer.addClass(className.active);
},
@ -4095,6 +4101,9 @@ $.fn.dimmer = function(parameters) {
.removeClass(className.active)
;
},
legacy: function() {
$dimmer.removeClass(className.legacy);
},
dimmed: function() {
$dimmable.removeClass(className.dimmed);
},
@ -4308,6 +4317,9 @@ $.fn.dimmer.settings = {
verbose : false,
performance : true,
// whether should use flex layout
useFlex : true,
// name to distinguish between multiple dimmers in context
dimmerName : false,
@ -4351,6 +4363,7 @@ $.fn.dimmer.settings = {
dimmer : 'dimmer',
disabled : 'disabled',
hide : 'hide',
legacy : 'legacy',
pageDimmer : 'page',
show : 'show'
},
@ -5391,7 +5404,12 @@ $.fn.dropdown = function(parameters) {
},
icon: {
click: function(event) {
module.toggle();
if($icon.hasClass(className.clear)) {
module.clear();
}
else {
module.toggle();
}
}
},
text: {
@ -6018,7 +6036,7 @@ $.fn.dropdown = function(parameters) {
},
hide: function(text, value, element) {
module.set.value(value, text);
module.set.value(value, text, $(element));
module.hideAndClear();
}
@ -6853,6 +6871,15 @@ $.fn.dropdown = function(parameters) {
$module.data(metadata.value, stringValue);
}
}
if(module.is.single() && settings.clearable) {
// treat undefined or '' as empty
if(!escapedValue) {
module.remove.clearable();
}
else {
module.set.clearable();
}
}
if(settings.fireOnInit === false && module.is.initialLoad()) {
module.verbose('No callback on initial load', settings.onChange);
}
@ -6948,7 +6975,10 @@ $.fn.dropdown = function(parameters) {
}
})
;
}
},
clearable: function() {
$icon.addClass(className.clear);
},
},
add: {
@ -7146,7 +7176,7 @@ $.fn.dropdown = function(parameters) {
}
module.set.value(newValue, addedValue, addedText, $selectedItem);
module.check.maxSelections();
}
},
},
remove: {
@ -7371,6 +7401,9 @@ $.fn.dropdown = function(parameters) {
.removeAttr('tabindex')
;
}
},
clearable: function() {
$icon.removeClass(className.clear);
}
},
@ -8058,6 +8091,8 @@ $.fn.dropdown.settings = {
values : false, // specify values to use for dropdown
clearable : false, // whether the value of the dropdown can be cleared
apiSettings : false,
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
minCharacters : 0, // Minimum characters required to trigger API call
@ -8210,6 +8245,7 @@ $.fn.dropdown.settings = {
active : 'active',
addition : 'addition',
animating : 'animating',
clear : 'clear',
disabled : 'disabled',
empty : 'empty',
dropdown : 'ui dropdown',
@ -9112,8 +9148,7 @@ $.fn.modal = function(parameters) {
debug : settings.debug,
variation : settings.centered
? false
: 'top aligned'
,
: 'top aligned',
dimmerName : 'modals'
},
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
@ -9134,7 +9169,7 @@ $.fn.modal = function(parameters) {
$dimmer = $dimmable.dimmer('get dimmer');
},
id: function() {
id = (Math.random().toString(16) + '000000000').substr(2,8);
id = (Math.random().toString(16) + '000000000').substr(2, 8);
elementEventNamespace = '.' + id;
module.verbose('Creating unique id for element', id);
}
@ -9169,6 +9204,9 @@ $.fn.modal = function(parameters) {
refresh: function() {
module.remove.scrolling();
module.cacheSizes();
if(!module.can.useFlex()) {
module.set.modalOffset();
}
module.set.screenHeight();
module.set.type();
},
@ -9209,12 +9247,22 @@ $.fn.modal = function(parameters) {
$window
.on('resize' + elementEventNamespace, module.event.resize)
;
},
scrollLock: function() {
// touch events default to passive, due to changes in chrome to optimize mobile perf
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
}
},
unbind: {
scrollLock: function() {
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
}
},
get: {
id: function() {
return (Math.random().toString(16) + '000000000').substr(2,8);
return (Math.random().toString(16) + '000000000').substr(2, 8);
}
},
@ -9229,6 +9277,9 @@ $.fn.modal = function(parameters) {
ignoreRepeatedEvents = false;
});
},
preventScroll: function(event) {
event.preventDefault();
},
deny: function() {
if(ignoreRepeatedEvents || settings.onDeny.call(element, $(this)) === false) {
module.verbose('Deny callback returned false cancelling hide');
@ -9306,6 +9357,8 @@ $.fn.modal = function(parameters) {
;
module.refreshModals();
module.set.dimmerSettings();
module.set.dimmerStyles();
module.showModal(callback);
},
@ -9324,9 +9377,16 @@ $.fn.modal = function(parameters) {
: function(){}
;
if( module.is.animating() || !module.is.active() ) {
module.showDimmer();
module.cacheSizes();
if(module.can.useFlex()) {
module.remove.legacy();
}
else {
module.set.legacy();
module.set.modalOffset();
module.debug('Using non-flex legacy modal positioning.');
}
module.set.screenHeight();
module.set.type();
module.set.clickaway();
@ -9404,6 +9464,7 @@ $.fn.modal = function(parameters) {
},
onComplete : function() {
settings.onHidden.call(element);
module.remove.dimmerStyles();
module.restore.focus();
callback();
}
@ -9428,6 +9489,7 @@ $.fn.modal = function(parameters) {
hideDimmer: function() {
if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
module.unbind.scrollLock();
$dimmable.dimmer('hide', function() {
module.remove.clickaway();
module.remove.screenHeight();
@ -9515,11 +9577,18 @@ $.fn.modal = function(parameters) {
active: function() {
$module.removeClass(className.active);
},
legacy: function() {
$module.removeClass(className.legacy);
},
clickaway: function() {
$dimmer
.off('click' + elementEventNamespace)
;
},
dimmerStyles: function() {
$dimmer.removeClass(className.inverted);
$dimmable.removeClass(className.blurring);
},
bodyStyle: function() {
if($body.attr('style') === '') {
module.verbose('Removing style attribute');
@ -9548,11 +9617,13 @@ $.fn.modal = function(parameters) {
$module.addClass(className.loading);
var
scrollHeight = $module.prop('scrollHeight'),
modalWidth = $module.outerWidth(),
modalHeight = $module.outerHeight()
;
if(module.cache === undefined || modalHeight !== 0) {
module.cache = {
pageHeight : $(document).outerHeight(),
width : modalWidth,
height : modalHeight + settings.offset,
scrollHeight : scrollHeight + settings.offset,
contextHeight : (settings.context == 'body')
@ -9566,6 +9637,12 @@ $.fn.modal = function(parameters) {
},
can: {
useFlex: function() {
return (settings.useFlex == 'auto')
? settings.detachable && !module.is.ie()
: settings.useFlex
;
},
fit: function() {
var
contextHeight = module.cache.contextHeight,
@ -9587,6 +9664,13 @@ $.fn.modal = function(parameters) {
active: function() {
return $module.hasClass(className.active);
},
ie: function() {
var
isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
isIE = ('ActiveXObject' in window)
;
return (isIE11 || isIE);
},
animating: function() {
return $module.transition('is supported')
? $module.transition('is animating')
@ -9598,7 +9682,7 @@ $.fn.modal = function(parameters) {
},
modernBrowser: function() {
// appName for IE11 reports 'Netscape' can no longer use
return !(window.ActiveXObject || "ActiveXObject" in window);
return !(window.ActiveXObject || 'ActiveXObject' in window);
}
},
@ -9630,10 +9714,10 @@ $.fn.modal = function(parameters) {
debug : settings.debug,
dimmerName : 'modals',
closable : 'auto',
useFlex : module.can.useFlex(),
variation : settings.centered
? false
: 'top aligned'
,
: 'top aligned',
duration : {
show : settings.duration,
hide : settings.duration
@ -9646,6 +9730,11 @@ $.fn.modal = function(parameters) {
? dimmerSettings.variation + ' inverted'
: 'inverted'
;
}
$context.dimmer('setting', dimmerSettings);
},
dimmerStyles: function() {
if(settings.inverted) {
$dimmer.addClass(className.inverted);
}
else {
@ -9657,7 +9746,21 @@ $.fn.modal = function(parameters) {
else {
$dimmable.removeClass(className.blurring);
}
$context.dimmer('setting', dimmerSettings);
},
modalOffset: function() {
var
width = module.cache.width,
height = module.cache.height
;
$module
.css({
marginTop: (settings.centered && module.can.fit())
? -(height / 2)
: 0,
marginLeft: -(width / 2)
})
;
module.verbose('Setting modal offset for legacy mode');
},
screenHeight: function() {
if( module.can.fit() ) {
@ -9676,12 +9779,17 @@ $.fn.modal = function(parameters) {
scrolling: function() {
$dimmable.addClass(className.scrolling);
$module.addClass(className.scrolling);
module.unbind.scrollLock();
},
legacy: function() {
$module.addClass(className.legacy);
},
type: function() {
if(module.can.fit()) {
module.verbose('Modal fits on screen');
if(!module.others.active() && !module.others.animating()) {
module.remove.scrolling();
module.bind.scrollLock();
}
}
else {
@ -9882,6 +9990,9 @@ $.fn.modal.settings = {
name : 'Modal',
namespace : 'modal',
useFlex : 'auto',
offset : 0,
silent : false,
debug : false,
verbose : false,
@ -9911,7 +10022,6 @@ $.fn.modal.settings = {
queue : false,
duration : 500,
offset : 0,
transition : 'scale',
// padding with edge of page
@ -9951,6 +10061,7 @@ $.fn.modal.settings = {
animating : 'animating',
blurring : 'blurring',
inverted : 'inverted',
legacy : 'legacy',
loading : 'loading',
scrolling : 'scrolling',
undetached : 'undetached'
@ -11482,12 +11593,12 @@ $.fn.popup = function(parameters) {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
module.bind.closeOnScroll();
}
if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
if(settings.on == 'click' && settings.closable) {
if(module.is.closable()) {
module.bind.clickaway();
}
else if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
},
closeOnScroll: function() {
module.verbose('Binding scroll close event to document');
@ -11543,10 +11654,19 @@ $.fn.popup = function(parameters) {
should: {
centerArrow: function(calculations) {
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
}
},
},
is: {
closable: function() {
if(settings.closable == 'auto') {
if(settings.on == 'hover') {
return false;
}
return true;
}
return settings.closable;
},
offstage: function(distanceFromBoundary, position) {
var
offstage = []

8
dist/semantic.min.css
File diff suppressed because it is too large
View File

2
dist/semantic.min.js
File diff suppressed because it is too large
View File

189
src/definitions/elements/loader.less

@ -162,195 +162,6 @@
Types
*******************************/
/*-------------------
Content
--------------------*/
.ui.content.loader {
position: static;
left: 0px;
top: 0px;
transform: none;
margin: 0em;
will-change: background-position, transform;
overflow: hidden;
backface-visibility: hidden;
animation: placeholderShimmer @contentLoadingAnimationDuration linear;
animation-iteration-count: infinite;
background-color: @white;
background-image: @contentLoadingGradient;
background-size: @contentLoadingGradientWidth 100%;
max-width: @contentLoaderMaxWidth;
}
.ui.content.content.loader {
width: auto;
height: auto;
}
.ui.content.loader,
.ui.content.loader > :before,
.ui.content.loader .image.header:after,
.ui.content.loader .line,
.ui.content.loader .line:after {
background-color: @white;
}
.ui.content.loader:before,
.ui.content.loader:after {
display: none;
}
@keyframes placeholderShimmer{
0% {
background-position: -@contentLoadingGradientWidth 0
}
100% {
background-position: @contentLoadingGradientWidth 0
}
}
.ui.content.loader + .ui.content.loader {
margin-top: 2rem;
animation-delay: 0.1s;
}
.ui.content.loader + .ui.content.loader + .ui.content.loader {
animation-delay: 0.2s;
}
.ui.content.loader + .ui.content.loader + .ui.content.loader + .ui.content.loader {
animation-delay: 0.3s;
}
.ui.content.loader + .ui.content.loader + .ui.content.loader + .ui.content.loader + .ui.content.loader {
animation-delay: 0.4s;
}
/* Image */
.ui.content.loader .image:not(.header) {
height: @contentImageHeight;
}
.ui.content.loader .square.image:not(.header) {
height: 0px;
overflow: hidden;
/* 1/1 aspect ratio */
padding-top: 100%;
}
.ui.content.loader .rectangular.image:not(.header) {
height: 0px;
overflow: hidden;
/* 4/3 aspect ratio */
padding-top: 75%;
}
/* Lines */
.ui.content.loader .line {
position: relative;
height: @contentLineMargin;
}
.ui.content.loader .line:first-child {
height: 0px;
}
.ui.content.loader .line:before,
.ui.content.loader .line:after {
top: 100%;
position: absolute;
content: '';
background-color: inherit;
}
.ui.content.loader .line:before {
left: 0px;
}
.ui.content.loader .line:after {
right: 0px;
}
/* Any Lines */
.ui.content.loader .line {
margin-bottom: @contentLineHeight;
}
.ui.content.loader .line:before,
.ui.content.loader .line:after {
height: @contentLineHeight;
}
.ui.content.loader .line:not(:first-child) {
margin-top: @contentLineHeight;
}
/* Header Image + 2 Lines */
.ui.content.loader .header {
position: relative;
overflow: hidden;
}
/* Line Outdent */
.ui.content.loader .line:nth-child(1):after {
width: @contentLineOneOutdent;
}
.ui.content.loader .line:nth-child(2):after {
width: @contentLineTwoOutdent;
}
.ui.content.loader .line:nth-child(3):after {
width: @contentLineThreeOutdent;
}
.ui.content.loader .line:nth-child(4):after {
width: @contentLineFourOutdent;
}
.ui.content.loader .line:nth-child(5):after {
width: @contentLineFiveOutdent;
}
/* Header Line 1 & 2*/
.ui.content.loader .header .line {
margin-bottom: @contentHeaderLineHeight;
}
.ui.content.loader .header .line:before,
.ui.content.loader .header .line:after {
height: @contentHeaderLineHeight;
}
.ui.content.loader .header .line:not(:first-child) {
margin-top: @contentHeaderLineHeight;
}
.ui.content.loader .header .line:after {
width: @contentHeaderLineOneOutdent;
}
.ui.content.loader .header .line:nth-child(2):after {
width: @contentHeaderLineTwoOutdent;
}
/* Image Header */
.ui.content.loader .image.header .line {
margin-left: @contentImageWidth;
}
.ui.content.loader .image.header .line:before {
width: @contentImageTextIndent;
}
.ui.content.loader .image.header:after {
display: block;
height: @contentLineMargin;
content: '';
margin-left: @contentImageWidth;
}
/* Paragraph */
.ui.content.loader .image:not(:first-child):before,
.ui.content.loader .paragraph:not(:first-child):before,
.ui.content.loader .header:not(:first-child):before {
height: @contentSpacing;
content: '';
display: block;
}
/* Inverted Content Loader */
.ui.inverted.content.loader {
background-image: @contentInvertedLoadingGradient;
}
.ui.inverted.content.loader,
.ui.inverted.content.loader > :before,
.ui.inverted.content.loader .image.header:after,
.ui.inverted.content.loader .line,
.ui.inverted.content.loader .line:after {
background-color: @black;
}
/*-------------------
Text
--------------------*/

213
src/definitions/elements/placeholder.less

@ -0,0 +1,213 @@
/*!
* # Semantic UI - Loader
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Theme
*******************************/
@type : 'element';
@element : 'placeholder';
@import (multiple) '../../theme.config';
/*-------------------
Content
--------------------*/
.ui.placeholder {
position: static;
left: 0px;
top: 0px;
transform: none;
margin: 0em;
will-change: background-position, transform;
overflow: hidden;
backface-visibility: hidden;
animation: placeholderShimmer @placeholderLoadingAnimationDuration linear;
animation-iteration-count: infinite;
background-color: @white;
background-image: @placeholderLoadingGradient;
background-size: @placeholderLoadingGradientWidth 100%;
max-width: @placeholderMaxWidth;
}
@keyframes placeholderShimmer{
0% {
background-position: -@placeholderLoadingGradientWidth 0
}
100% {
background-position: @placeholderLoadingGradientWidth 0
}
}
.ui.placeholder,
.ui.placeholder > :before,
.ui.placeholder .image.header:after,
.ui.placeholder .line,
.ui.placeholder .line:after {
background-color: @white;
}
/* Image */
.ui.placeholder .image:not(.header) {
height: @placeholderImageHeight;
}
.ui.placeholder .square.image:not(.header) {
height: 0px;
overflow: hidden;
/* 1/1 aspect ratio */
padding-top: 100%;
}
.ui.placeholder .rectangular.image:not(.header) {
height: 0px;
overflow: hidden;
/* 4/3 aspect ratio */
padding-top: 75%;
}
/* Lines */
.ui.placeholder .line {
position: relative;
height: @placeholderLineMargin;
}
.ui.placeholder .line:before,
.ui.placeholder .line:after {
top: 100%;
position: absolute;
content: '';
background-color: inherit;
}
.ui.placeholder .line:before {
left: 0px;
}
.ui.placeholder .line:after {
right: 0px;
}
/* Any Lines */
.ui.placeholder .line {
margin-bottom: @placeholderLineHeight;
}
.ui.placeholder .line:before,
.ui.placeholder .line:after {
height: @placeholderLineHeight;
}
.ui.placeholder .line:not(:first-child) {
margin-top: @placeholderLineHeight;
}
/* Header Image + 2 Lines */
.ui.placeholder .header {
position: relative;
overflow: hidden;
}
/* Line Outdent */
.ui.placeholder .line:nth-child(1):after {
width: @placeholderLineOneOutdent;
}
.ui.placeholder .line:nth-child(2):after {
width: @placeholderLineTwoOutdent;
}
.ui.placeholder .line:nth-child(3):after {
width: @placeholderLineThreeOutdent;
}
.ui.placeholder .line:nth-child(4):after {
width: @placeholderLineFourOutdent;
}
.ui.placeholder .line:nth-child(5):after {
width: @placeholderLineFiveOutdent;
}
/* Header Line 1 & 2*/
.ui.placeholder .header .line {
margin-bottom: @placeholderHeaderLineHeight;
}
.ui.placeholder .header .line:before,
.ui.placeholder .header .line:after {
height: @placeholderHeaderLineHeight;
}
.ui.placeholder .header .line:not(:first-child) {
margin-top: @placeholderHeaderLineHeight;
}
.ui.placeholder .header .line:after {
width: @placeholderHeaderLineOneOutdent;
}
.ui.placeholder .header .line:nth-child(2):after {
width: @placeholderHeaderLineTwoOutdent;
}
/* Image Header */
.ui.placeholder .image.header .line {
margin-left: @placeholderImageWidth;
}
.ui.placeholder .image.header .line:before {
width: @placeholderImageTextIndent;
}
.ui.placeholder .image.header:after {
display: block;
height: @placeholderLineMargin;
content: '';
margin-left: @placeholderImageWidth;
}
/* Spacing */
.ui.placeholder .image .line:first-child,
.ui.placeholder .paragraph .line:first-child,
.ui.placeholder .header .line:first-child {
height: 0.01px;
}
.ui.placeholder .image:not(:first-child):before,
.ui.placeholder .paragraph:not(:first-child):before,
.ui.placeholder .header:not(:first-child):before {
height: @placeholderSpacing;
content: '';
display: block;
}
/* Inverted Content Loader */
.ui.inverted.placeholder {
background-image: @placeholderInvertedLoadingGradient;
}
.ui.inverted.placeholder,
.ui.inverted.placeholder > :before,
.ui.inverted.placeholder .image.header:after,
.ui.inverted.placeholder .line,
.ui.inverted.placeholder .line:after {
background-color: @black;
}
/*******************************
Variations
*******************************/
/*-------------------
Sizes
--------------------*/
.ui.placeholder .full.line.line.line:after {
width: @placeholderFullLineOutdent;
}
.ui.placeholder .very.long.line.line.line:after {
width: @placeholderVeryLongLineOutdent;
}
.ui.placeholder .long.line.line.line:after {
width: @placeholderLongLineOutdent;
}
.ui.placeholder .medium.line.line.line:after {
width: @placeholderMediumLineOutdent;
}
.ui.placeholder .short.line.line.line:after {
width: @placeholderShortLineOutdent;
}
.ui.placeholder .very.short.line.line.line:after {
width: @placeholderVeryShortLineOutdent;
}

38
src/definitions/elements/segment.less

@ -115,46 +115,46 @@
Placeholder
--------------------*/
.ui.placeholder.segment {
.ui.empty.segment {
display: flex;
flex-direction: column;
justify-content: center;
align-items: stretch;
padding: @placeholderPadding;
min-height: @placeholderMinHeight;
background: @placeholderBackground;
border-color: @placeholderBorderColor;
box-shadow: @placeholderBoxShadow;
padding: @emptyPadding;
min-height: @emptyMinHeight;
background: @emptyBackground;
border-color: @emptyBorderColor;
box-shadow: @emptyBoxShadow;
}
.ui.placeholder.segment .button,
.ui.placeholder.segment textarea {
.ui.empty.segment .button,
.ui.empty.segment textarea {
display: block;
}
.ui.placeholder.segment .button,
.ui.placeholder.segment .field,
.ui.placeholder.segment textarea,
.ui.placeholder.segment > .ui.input {
.ui.empty.segment .button,
.ui.empty.segment .field,
.ui.empty.segment textarea,
.ui.empty.segment > .ui.input {
max-width: 300px;
margin-left: auto;
margin-right: auto;
}
.ui.placeholder.segment .column .button,
.ui.placeholder.segment .column .field,
.ui.placeholder.segment .column textarea,
.ui.placeholder.segment .column > .ui.input {
.ui.empty.segment .column .button,
.ui.empty.segment .column .field,
.ui.empty.segment .column textarea,
.ui.empty.segment .column > .ui.input {
max-width: 250px;
}
.ui.placeholder.segment > .inline {
.ui.empty.segment > .inline {
align-self: center;
}
.ui.placeholder.segment > .inline > .button {
.ui.empty.segment > .inline > .button {
display: inline-block;
width: auto;
margin: 0px @5px 0px 0px;
}
.ui.placeholder.segment > .inline > .button:last-child {
.ui.empty.segment > .inline > .button:last-child {
margin-right: 0px;
}

1
src/theme.config.example

@ -54,6 +54,7 @@
@embed : 'default';
@modal : 'default';
@nag : 'default';
@placeholder: 'default';
@popup : 'default';
@progress : 'default';
@rating : 'default';

39
src/themes/default/elements/loader.variables

@ -25,50 +25,11 @@
--------------------*/
/* Text */
@contentLoaderMaxWidth: 50rem;
@textDistance: @relativeMini;
@loaderTextColor: @textColor;
@invertedLoaderTextColor: @invertedTextColor;
/* Content Loader Lines */
@contentSpacing: @relative20px;
@contentLineMargin: @relative12px;
@contentHeaderLineHeight: @relative9px;
@contentLineHeight: @relative7px;
@contentParagraphLineHeight: @contentLineHeight;
/* Image */
@contentImageHeight: 100px;
/* Header Image */
@contentImageWidth: 3em;
@contentImageTextIndent: @10px;
/* Paragraph */
@contentHeaderLineOneOutdent: 0px;
@contentHeaderLineTwoOutdent: 8em;
@contentLineOneOutdent: 4em;
@contentLineTwoOutdent: 7em;
@contentLineThreeOutdent: 2em;
@contentLineFourOutdent: 6em;
@contentLineFiveOutdent: 10em;
/* Glow Gradient */
@contentLoadingAnimationDuration: 2s;
@contentLoadingGradientWidth: 1200px;
@contentLoadingGradient: linear-gradient(to right,
#EEEEEE 0%,
#DDDDDD 15%,
#EEEEEE 30%
);
@contentInvertedLoadingGradient: linear-gradient(to right,
#222222 0%,
#333333 15%,
#222222 30%
);
/*-------------------
States
--------------------*/

3
src/themes/default/elements/placeholder.overrides

@ -0,0 +1,3 @@
/*******************************
Theme Overrides
*******************************/

49
src/themes/default/elements/placeholder.variables

@ -0,0 +1,49 @@
@placeholderMaxWidth: 50rem;
/* Key Content Sizing */
@placeholderLineMargin: @relative12px;
@placeholderHeaderLineHeight: @relative9px;
@placeholderLineHeight: @relative7px;
@placeholderParagraphLineHeight: @placeholderLineHeight;
@placeholderSpacing: @relative20px;
/* Image */
@placeholderImageHeight: 100px;
/* Header Image */
@placeholderImageWidth: 3em;
@placeholderImageTextIndent: @10px;
/* Paragraph */
@placeholderHeaderLineOneOutdent: 40%;
@placeholderHeaderLineTwoOutdent: 20%;
@placeholderLineOneOutdent: @placeholderLongLineOutdent;
@placeholderLineTwoOutdent: @placeholderShortLineOutdent;
@placeholderLineThreeOutdent: @placeholderMediumLineOutdent;
@placeholderLineFourOutdent: @placeholderVeryShortLineOutdent;
@placeholderLineFiveOutdent: @placeholderShortLineOutdent;
/* Glow Gradient */
@placeholderLoadingAnimationDuration: 2s;
@placeholderLoadingGradientWidth: 1200px;
@placeholderLoadingGradient: linear-gradient(to right,
#EEEEEE 0%,
#DDDDDD 15%,
#EEEEEE 30%
);
@placeholderInvertedLoadingGradient: linear-gradient(to right,
#222222 0%,
#333333 15%,
#222222 30%
);
/* Variations */
@placeholderFullLineOutdent: 0%;
@placeholderVeryLongLineOutdent: 10%;
@placeholderLongLineOutdent: 35%;
@placeholderMediumLineOutdent: 50%;
@placeholderShortLineOutdent: 65%;
@placeholderVeryShortLineOutdent: 80%;

10
src/themes/default/elements/segment.variables

@ -49,11 +49,11 @@
*******************************/
/* Placeholder */
@placeholderBackground: @offWhite;
@placeholderPadding: @padding;
@placeholderBorderColor: @borderColor;
@placeholderBoxShadow: 0px 2px 25px 0 rgba(34, 36, 38, 0.05) inset;
@placeholderMinHeight: 18rem;
@emptyBackground: @offWhite;
@emptyPadding: @padding;
@emptyBorderColor: @borderColor;
@emptyBoxShadow: 0px 2px 25px 0 rgba(34, 36, 38, 0.05) inset;
@emptyMinHeight: 18rem;
/* Piled */

1
tasks/config/admin/release.js

@ -89,6 +89,7 @@ module.exports = {
'message',
'modal',
'nag',
'placeholder',
'popup',
'progress',
'rail',

1
tasks/config/defaults.js

@ -59,6 +59,7 @@ module.exports = {
'label',
'list',
'loader',
'placeholder',
'rail',
'reveal',
'segment',

1
tasks/config/project/install.js

@ -389,6 +389,7 @@ module.exports = {
{ name: "embed", checked: true },
{ name: "modal", checked: true },
{ name: "nag", checked: true },
{ name: "placeholder", checked: true },
{ name: "popup", checked: true },
{ name: "progress", checked: true },
{ name: "rating", checked: true },

Loading…
Cancel
Save