• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript typestyle.cssRule函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中typestyle.cssRule函数的典型用法代码示例。如果您正苦于以下问题:TypeScript cssRule函数的具体用法?TypeScript cssRule怎么用?TypeScript cssRule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cssRule函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: cssRule

export const getTypeStyle = () => {
    const marginPaddingComponents = `html, body, div, object,
    iframe, h1, h2, h3, h4, h5, h6,
    p, blockquote, ol, ul, li, form,
    legend, label, table, header,
    footer, nav, section, figure`;
    cssRule(marginPaddingComponents, {
        margin: 0,
        padding: 0,
    });

    cssRule('.ant-btn, button', {
        cursor: 'default',
    })
    return getStyles();
};
开发者ID:jurajkocan,项目名称:FoursquareApi,代码行数:16,代码来源:GetTypeStyle.ts


示例2: useThemeCache

export const bodyCSS = useThemeCache(() => {
    const globalVars = globalVariables();
    cssRule("html, body", {
        backgroundColor: colorOut(globalVars.body.backgroundImage.color),
        ...fonts({
            size: globalVars.fonts.size.medium,
            family: globalVars.fonts.families.body,
            color: globalVars.mainColors.fg,
        }),
        wordBreak: "break-word",
        overscrollBehavior: "none", // For IE -> https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior
    });

    cssRule("*", {
        // For Mobile Safari -> https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior
        "-webkit-overflow-scrolling": "touch",
    });

    cssRule("h1, h2, h3, h4, h5, h6", {
        display: "block",
        lineHeight: globalVars.lineHeights.condensed,
        ...margins({
            all: 0,
        }),
        ...paddings({
            all: 0,
        }),
    });

    cssRule("p", {
        ...margins({
            all: 0,
        }),
        ...paddings({
            all: 0,
        }),
    });

    cssRule(".page", {
        display: "flex",
        overflow: "visible",
        flexDirection: "column",
        width: percent(100),
        minHeight: viewHeight(100),
        position: "relative",
        zIndex: 0,
    });

    cssRule(".page-minHeight", {
        flexGrow: 1,
        display: "flex",
        flexDirection: "column",
    });
});
开发者ID:vanilla,项目名称:vanilla,代码行数:54,代码来源:bodyStyles.ts


示例3: require

import {style, cssRule} from "typestyle";
import {rgba} from "typestyle/lib/csx";

const fontPath = require("./../../common/assets/fonts/roboto_regular_macroman/Roboto-Regular-webfont.woff");
const cssP: string = "url('" + fontPath + "')";

cssRule('@font-face', {
    fontFamily: 'robotoregular',
    src: cssP,
    fontWeight: "normal",
    fontStyle: "normal"
});

cssRule("body", {
    width: "100%",
    height: "100%",
    overflow: "hidden",
    fontFamily: "robotoregular"
});

cssRule("html, body", {
    border: 0,
    lineHeight: "1.5",
    margin: 0,
    padding: 0
});

cssRule("input:-webkit-autofill", {
    color: "#fff !important",
    transition: "all 0.2s",
    transitionDelay: "9999999s",
开发者ID:joergwasmeier,项目名称:lingua,代码行数:31,代码来源:reset.ts


示例4: cssRule

import { important, percent, px, viewHeight, viewWidth } from 'csx';
import { cssRule, style } from 'typestyle';

export const backgroundColor = '#444';
export const textColor = '#eee';

cssRule('h1, h2, h3, h4, h5, h6, p, label', {
  userSelect: 'none'
});

cssRule('.modal-header > h1, h2, h3, h4, h5, h6', {
  marginTop: px(10)
});

cssRule('html, body', {
  height: percent(100)
});

cssRule('span, p, label', {
  userSelect: 'none',
  cursor: 'default'
});

cssRule('#content', {
  height: viewHeight(100),
  width: viewWidth(100)
});

cssRule('.panel-body', {
  padding: px(10)
});
开发者ID:codeandcats,项目名称:Polygen,代码行数:31,代码来源:styles.ts


示例5: useThemeCache


//.........这里部分代码省略.........
    const top = style("top", {
        width: percent(100),
        marginBottom: unit(globalVars.gutter.half),
    });

    const container = style("container", {
        display: "flex",
        flexWrap: "nowrap",
        alignItems: "flex-start",
        justifyContent: "space-between",
    });

    const fullWidth = style("fullWidth", {
        position: "relative",
        padding: 0,
    });

    const leftColumn = style("leftColumn", {
        position: "relative",
        width: unit(vars.panel.paddedWidth),
        flexBasis: unit(vars.panel.paddedWidth),
        minWidth: unit(vars.panel.paddedWidth),
    });

    const rightColumn = style("rightColumn", {
        position: "relative",
        width: unit(vars.panel.paddedWidth),
        flexBasis: unit(vars.panel.paddedWidth),
        minWidth: unit(vars.panel.paddedWidth),
        overflow: "initial",
    });

    const middleColumn = style("middleColumn", {
        justifyContent: "space-between",
        flexGrow: 1,
        width: percent(100),
        maxWidth: percent(100),
        ...mediaQueries.oneColumnDown(paddings({ left: important(0), right: important(0) })),
    });

    const middleColumnMaxWidth = style("middleColumnMaxWidth", {
        $nest: {
            "&.hasAdjacentPanel": {
                flexBasis: calc(`100% - ${unit(vars.panel.paddedWidth)}`),
                maxWidth: calc(`100% - ${unit(vars.panel.paddedWidth)}`),
                ...mediaQueries.oneColumnDown({
                    flexBasis: percent(100),
                    maxWidth: percent(100),
                }),
            },
            "&.hasTwoAdjacentPanels": {
                flexBasis: calc(`100% - ${unit(vars.panel.paddedWidth * 2)}`),
                maxWidth: calc(`100% - ${unit(vars.panel.paddedWidth * 2)}`),
                ...mediaQueries.oneColumnDown({
                    flexBasis: percent(100),
                    maxWidth: percent(100),
                }),
            },
        },
    });

    const breadcrumbs = style("breadcrumbs", {});

    const isSticky = style(
        "isSticky",
        {
            ...sticky(),
            top: titleBarVars.sizing.height * 2,
            height: percent(100),
            overflow: "auto",
        },
        mediaQueries.oneColumnDown({
            position: "relative",
            top: "auto",
            left: "auto",
            bottom: "auto",
        }),
    );

    // To remove when we have overlay styles converted
    cssRule(`.overlay .${root}.noBreadcrumbs .${main}`, {
        paddingTop: 0,
    });

    return {
        root,
        content,
        top,
        main,
        container,
        fullWidth,
        leftColumn,
        rightColumn,
        middleColumn,
        middleColumnMaxWidth,
        panel,
        isSticky,
        breadcrumbs,
    };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:101,代码来源:panelLayoutStyles.ts


示例6: require

const browser = require('detect-browser')

if (browser.name === 'ie') {
  const appElement : HTMLElement = document.getElementById('app') as HTMLElement
  appElement.innerHTML = '<h2>You appear to be using Internet Explorer<br/>It would be a good time to examine the life choices that have led you to this moment</h2>'
  appElement.style.cssText = 'height: 100%; text-align: center; padding-top: 50vh; background-color: black;'
  appElement.id = 'nope'
}

normalize()
setupPage('#app')

const popArtShadow = {textShadow: '5px 5px 0 #000, 2px 0 0 black,  0 2px 0 black, 0 -2px 0 black, -2px 0 0 black', color: '#fff'}

cssRule('body', {fontFamily: '"PT Sans", sans-serif', background: `#bb270f url(${bgImage})`, backgroundSize: 'cover', color: '#fff', fontSize: '20px'})
cssRule('h1', {fontFamily: 'Bangers, sans-serif', transform: 'rotate(-4deg)', letterSpacing: '5px', margin: '150px 0 20px 0', textAlign: 'center', fontSize: '4em'}, popArtShadow)
cssRule('h2', {fontFamily: 'Bangers, sans-serif', transform: 'rotate(0deg)', letterSpacing: '2px', margin: '30px 0 20px 0', textAlign: 'center', fontSize: '2em'}, popArtShadow)
cssRule('a', {color: '#fff'})

const main : Component = onionify(App)

const drivers : any = {
    DOM: makeDOMDriver('#app'),
    HTTP: makeHTTPDriver()
}
export const driverNames : string[] = Object.keys(drivers)

// Cycle apps (main functions) are allowed to return any number of sinks streams
// This sets defaults for all drivers that are not used by the app
const defaultSinks : (s : Sources) => RootSinks = sources => ({
开发者ID:klarna,项目名称:the-konferense,代码行数:30,代码来源:index.ts


示例7: cssRule

import { cssRule } from 'typestyle';

cssRule('.input-group', {
  $nest: {
    'input.form-control': {
      borderColor: '#222529'
    },
    '.input-group-addon': {
      backgroundColor: '#222529',
      borderColor: '#222529'
    }
  }
});

cssRule('.has-error .input-group-addon', {
  borderColor: '#ee5f5b'
});

cssRule('.help-block', {
  color: '#888'
});

cssRule('.btn.disabled, .btn[disabled], fieldset[disabled] .btn', {
  opacity: 0.55
});
开发者ID:codeandcats,项目名称:Polygen,代码行数:25,代码来源:theme.ts



注:本文中的typestyle.cssRule函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript typestyle.media函数代码示例发布时间:2022-05-25
下一篇:
TypeScript typestore.Log类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap