// add mixins
$content .= $this->prepareFile(WCF_DIR.'style/bootstrap/mixin.scss');
+ // add newer mixins added with WCF 2.2
+ foreach (glob(WCF_DIR.'style/bootstrap/mixin/*.scss') as $mixin) {
+ $content .= $this->prepareFile($mixin);
+ }
+
return $content;
}
$content = $callback($content);
- // compress stylesheet
- /*$lines = explode("\n", $content);
- $content = $lines[0] . "\n" . $lines[1] . "\n";
- for ($i = 2, $length = count($lines); $i < $length; $i++) {
- $line = trim($lines[$i]);
- $content .= $line;
-
- switch (substr($line, -1)) {
- case ',':
- $content .= ' ';
- break;
-
- case '}':
- $content .= "\n";
- break;
- }
-
- if (substr($line, 0, 6) == '@media') {
- $content .= "\n";
- }
- }
- */
-
// write stylesheet
file_put_contents($filename.'.css', $content);
FileUtil::makeWritable($filename.'.css');
.quoteBoxTitle {
flex: 1 auto;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
/* shortcuts */
// clearing floats like a boss h5bp.com/q
-.clearfix {
+@mixin clearfix {
&::before,
&::after {
display: table;
}
}
-.userSelectNone {
+.clearfix {
+ @include clearfix;
+}
+
+@mixin userSelectNone {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
--- /dev/null
+@mixin box($imageSize, $margin: 0) {
+ display: flex;
+
+ > :first-child:not(:last-child) {
+ flex: 0 0 auto;
+ margin-right: $margin;
+ }
+
+ > :last-child {
+ flex: 1;
+ overflow: hidden;
+ }
+}
--- /dev/null
+@mixin wcfFontDefault {
+ font-size: $wcfFontSizeDefault;
+ font-weight: 400;
+}
+
+@mixin wcfFontSmall {
+ font-size: $wcfFontSizeSmall;
+ font-weight: 400;
+}
+
+@mixin wcfFontBold {
+ font-weight: 600;
+}
+
+@mixin wcfFontHeadline {
+ font-size: $wcfFontSizeHeadline;
+ font-weight: 400;
+}
+
+@mixin wcfFontSection {
+ font-size: $wcfFontSizeSection;
+ font-weight: 300;
+}
+
+@mixin wcfFontTitle {
+ font-size: $wcfFontSizeTitle;
+ font-weight: 300;
+}
+
+@mixin wcfLineHeight {
+ line-height: $wcfFontLineHeight;
+}
--- /dev/null
+@mixin nativeList {
+ margin: 1em 0 1em 40px;
+
+ ul,
+ ol {
+ margin-bottom: 0;
+ margin-top: 0;
+ }
+
+ li {
+ margin: 5px 0;
+ }
+}
+
+@mixin commaSeparated {
+ > li {
+ &:not(:last-child):after {
+ content: ",";
+ padding-left: 1px;
+ }
+ }
+}
+
+@mixin dotSeparated {
+ > li {
+ &:not(:last-child):after {
+ content: "\00b7";
+ margin-left: 5px;
+ }
+ }
+}
+
+@mixin inlineList {
+ display: flex;
+ flex-wrap: wrap;
+
+ > li {
+ flex: 0 auto;
+
+ &:not(:last-child) {
+ margin-right: 5px;
+ }
+
+ > a {
+ // @todo: still necessary?
+ /*display: inline-flex;*/
+ }
+ }
+
+ /* adds a comma after each list item */
+ &.commaSeparated {
+ @include commaSeparated;
+ }
+
+ /* adds a dot after each list item */
+ &.dotSeparated {
+ @include dotSeparated;
+ }
+}
}
&.dataList {
- @extend .clearfix;
+ @include clearfix;
> dt {
clear: right;
text-align: left;
white-space: nowrap;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
> dd {
/* makes an inline-list */
.inlineList {
- display: flex;
- flex-wrap: wrap;
-
- > li {
- flex: 0 auto;
-
- &:not(:last-child) {
- margin-right: 5px;
- }
-
- > a {
- // @todo: still necessary?
- /*display: inline-flex;*/
- }
- }
-
- /* adds a comma after each list item */
- &.commaSeparated {
- > li {
- &:not(:last-child):after {
- content: ",";
- padding-left: 1px;
- }
- }
- }
-
- /* adds a dot after each list item */
- &.dotSeparated {
- > li {
- &:not(:last-child):after {
- content: "\00b7";
- margin-left: 5px;
- }
- }
- }
+ @include inlineList;
}
/* restores the native styling for lists */
/* tag cloud list */
.tagList {
- @extend .inlineList;
+ @include inlineList;
align-items: baseline;
}
/* legacy styling (deprecated) */
ol.dataList,
ul.dataList {
- @extend .inlineList;
- @extend .wcfFontSmall;
+ @include inlineList;
+ @include wcfFontSmall;
> li {
&:not(:last-child):after {
}
.boxTitle {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
& + .boxContent {
margin-top: 20px;
}
.boxTitle {
- @extend .wcfFontTitle;
+ @include wcfFontTitle;
}
.boxWithImage {
.boxTitle {
color: $wcfContentHeadlineText;
- @extend .wcfFontSection;
+ @include wcfFontSection;
a {
color: $wcfContentHeadlineLink;
}
.boxWithImage {
- @extend .clearfix;
+ @include clearfix;
.boxTitle,
.boxContent {
}
.boxWithImage {
- @extend .clearfix;
+ @include clearfix;
.boxTitle,
.boxContent {
}
.boxWithImage {
- @extend .clearfix;
+ @include clearfix;
.boxTitle,
.boxContent {
.boxTitle {
color: $wcfContentHeadlineText;
- @extend .wcfFontSection;
+ @include wcfFontSection;
a {
color: $wcfContentHeadlineLink;
}
.boxWithImage {
- @extend .clearfix;
+ @include clearfix;
.boxTitle,
.boxContent {
&.boxMenuHasChildren {
> .boxMenuLink {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
margin-bottom: 10px;
}
.contentTitle,
> h1 { // deprecated
- @extend .wcfFontTitle;
+ @include wcfFontTitle;
.badge {
top: -2px;
> h2 {
color: $wcfContentHeadlineText; // todo: rename variable
- @extend .wcfFontSection;
+ @include wcfFontSection;
a {
color: $wcfContentHeadlineLink; // todo: rename variable
.sectionTitle {
color: $wcfContentHeadlineText; // todo: rename variable
- @extend .wcfFontSection;
+ @include wcfFontSection;
a {
color: $wcfContentHeadlineLink; // todo: rename variable
}
.sectionTitle {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
> .sectionHeader,
padding-bottom: 10px;
width: 100%;
- @extend .wcfFontSection;
+ @include wcfFontSection;
a {
color: $wcfContentHeadlineLink; // todo: rename variable
> legend {
margin-bottom: 15px;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
}
}
/* styling for container headlines */
.containerHeadline {
> h3 {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
> .badge {
top: -2px;
// input elements do not inherit font family, size and line-height from body
font-family: $wcfFontFamily;
- @extend .wcfFontDefault;
- @extend .wcfLineHeight;
+ @include wcfFontDefault;
+ @include wcfLineHeight;
&:focus,
&:hover {
border-width: 1px;
width: 100%;
- @extend .wcfFontDefault;
+ @include wcfFontDefault;
&[disabled],
&[readonly] {
}
/* boxes with an image */
-@mixin box($imageSize, $margin: 0) {
- display: flex;
-
- > :first-child:not(:last-child) {
- flex: 0 0 auto;
- margin-right: $margin;
- }
-
- > :last-child {
- flex: 1;
- overflow: hidden;
- }
-}
-
.box16 { @include box(16px, 5px); }
.box24 { @include box(24px, 8px); }
.box32 { @include box(32px, 10px); }
.box128 { @include box(128px, 20px); }
.box256 { @include box(256px, 30px); }
-.wcfFontDefault {
- font-size: $wcfFontSizeDefault;
- font-weight: 400;
-}
-
-.wcfFontSmall {
- font-size: $wcfFontSizeSmall;
- font-weight: 400;
-}
-
-.wcfFontBold {
- font-weight: 600;
-}
-
-.wcfFontHeadline {
- font-size: $wcfFontSizeHeadline;
- font-weight: 400;
-}
-
-.wcfFontSection {
- font-size: $wcfFontSizeSection;
- font-weight: 300;
-}
-
-.wcfFontTitle {
- font-size: $wcfFontSizeTitle;
- font-weight: 300;
-}
-
-.wcfLineHeight {
- line-height: $wcfFontLineHeight;
-}
-
small, .small {
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
strong {
- @extend .wcfFontBold;
+ @include wcfFontBold;
}
img {
}
.nativeList {
- margin: 1em 0 1em 40px;
-
- ul,
- ol {
- margin-bottom: 0;
- margin-top: 0;
- }
-
- li {
- margin: 5px 0;
- }
+ @include nativeList;
}
ul.nativeList {
}
h1 {
- @extend .wcfFontTitle;
+ @include wcfFontTitle;
}
h2 {
- @extend .wcfFontSection;
+ @include wcfFontSection;
}
h3 {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
h1, h2, h3, h4, h5, h6 {
}
ul, ol {
- @extend .nativeList;
+ @include nativeList;
}
ul {
html, body {
height: 100%;
- @extend .wcfLineHeight;
- @extend .wcfFontDefault;
+ @include wcfLineHeight;
+ @include wcfFontDefault;
}
body {
> li {
flex: 0 0 auto;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
> a {
background-color: $wcfHeaderMenuBackground;
background-clip: padding-box;
border-top: 3px solid transparent;
- @extend .wcfFontDefault;
+ @include wcfFontDefault;
> li {
> a {
margin-bottom: 15px;
padding: 0;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
> a {
color: $wcfSidebarHeadlineLink;
white-space: nowrap;
word-wrap: normal;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
/* colors */
&.badgeUpdate {
> li {
flex: 0 auto;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
&:not(:last-child) {
margin-right: 10px;
// input elements do not inherit font family, size and line-height from body
font-family: $wcfFontFamily;
- @extend .wcfFontDefault;
- @extend .wcfLineHeight;
+ @include wcfFontDefault;
+ @include wcfLineHeight;
.icon {
color: $wcfButtonText;
&.small {
padding: 4px 7px;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
}
}
.buttonList {
- @extend .inlineList;
+ @include inlineList;
&.smallButtons .button {
padding: 4px 7px;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
/* members list */
}
.buttonGroupNavigation > ul {
- @extend .inlineList;
+ @include inlineList;
}
.buttonGroup {
- @extend .inlineList;
+ @include inlineList;
> li {
&:not(:last-child) {
}
.wcfLikeCounter {
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
}
> span {
text-transform: uppercase;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
}
> span {
flex: 1 auto;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
> .dialogCloseButton {
margin-top: 30px;
.sectionTitle {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
}
&.dropdownText {
padding: $wcfGapTiny $wcfGapMedium;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
&.boxFlag {
margin-bottom: 0;
> p {
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
}
}
.interactiveDropdownTitle {
flex: 1 1 auto;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
.interactiveDropdownLinks {
padding: 20px 10px;
text-align: center;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
}
/* #### Labels #### */
/* label list */
.labelList {
- @extend .inlineList;
+ @include inlineList;
display: inline-flex;
#mediaManagerMediaList {
font-size: 0;
- @extend .clearfix;
+ @include clearfix;
> li {
float: left;
padding: $wcfGapSmall;
box-sizing: border-box;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
> .buttonGroupNavigation {
}
.dataList {
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
.userAvatar {
.username {
display: inline-block;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
.badgeOnline {
}
.messageTitle {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
color: $wcfContentHeadlineText;
}
.messageHeaderMetaData {
- @extend .inlineList;
- @extend .dotSeparated;
- @extend .wcfFontSmall;
+ @include inlineList;
+ @include dotSeparated;
+ @include wcfFontSmall;
.messagePublicationTime {
color: $wcfContentDimmedText;
}
.messageStatus {
- @extend .inlineList;
- @extend .wcfFontSmall;
+ @include inlineList;
+ @include wcfFontSmall;
.wcfLikeCounter {
color: $wcfContentDimmedText;
}
.messageQuickOptions {
- @extend .inlineList;
+ @include inlineList;
}
/* content - body */
margin-top: 20px;
padding: 5px 10px;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
a {
color: $wcfContentDimmedLink;
cursor: pointer;
flex: 0 0 auto;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
> .icon {
color: $wcfContentDimmedText;
white-space: nowrap;
> .messageGroupLink {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
> .badge.label {
}
/*todo
.messageGroupInfo {
- @extend .inlineList;
- @extend .wcfFontSmall;
+ @include inlineList;
+ @include wcfFontSmall;
> li:not(:last-child) {
margin-right: 5px;
opacity: 0;
transition: opacity .2s;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
&:not(:last-child) {
margin-right: 5px;
right: 20px;
z-index: 400;
- @extend .inlineList;
+ @include inlineList;
> li {
animation: wcfPageActionOut .3s;
margin-bottom: 10px;
padding-right: 20px;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
}
&::after {
text-align: center;
text-decoration: none;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
&.redactor-button-disabled,
&.redactor-button-disabled:before,
> ul {
border-bottom: 1px solid $wcfContentBorderInner;
- @extend .inlineList;
+ @include inlineList;
> li {
&:not(:last-child) {
display: block;
padding: 5px 0;
- @extend .wcfFontSection;
+ @include wcfFontSection;
}
}
}
position: relative;
> ul {
- @extend .inlineList;
+ @include inlineList;
> li {
&:not(:last-child) {
padding: 5px 20px;
> ul {
- @extend .inlineList;
+ @include inlineList;
> li {
outline: 0;
display: block;
outline: 0;
- @extend .userSelectNone;
- @extend .wcfFontSmall;
+ @include userSelectNone;
+ @include wcfFontSmall;
}
}
}
border: 1px solid $wcfContentBorderInner;
border-top-width: 0;
- @extend .inlineList;
+ @include inlineList;
> li {
border-right: 1px solid $wcfContentBorderInner;
display: block;
padding: 10px 20px;
- @extend .userSelectNone;
+ @include userSelectNone;
> span.icon {
display: none;
.tabularListRowHead > .tabularListColumns > li {
color: $wcfTabularBoxHeadline;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
> a {
color: $wcfTabularBoxHeadline;
> h1,
> h2,
> h3 {
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
+ small {
display: block;
text-align: left;
white-space: nowrap;
- @extend .wcfFontHeadline;
+ @include wcfFontHeadline;
> a {
color: $wcfTabularBoxHeadline;
white-space: nowrap;
word-wrap: normal;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
&.columnURL, &.columnSmallText {
text-align: left;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
}
}
visibility: hidden;
z-index: 800;
- @extend .wcfFontSmall;
+ @include wcfFontSmall;
> .elementPointer {
border-color: $wcfTooltipBackground transparent;
transition-delay: 0s;
}
-}
\ No newline at end of file
+}