Giter Site home page Giter Site logo

ant-design / ant-design-dark-theme Goto Github PK

View Code? Open in Web Editor NEW
481.0 15.0 34.0 38 KB

🌚 Dark theme variables of Ant Design

Home Page: https://www.antdtheme.com/dark

License: MIT License

JavaScript 45.25% TypeScript 54.75%
dark-theme antd ant-design ant-design-pro less

ant-design-dark-theme's Introduction

🌚 Ant Design Dark Theme 🌚

Travis npm package NPM downloads

Dependencies DevDependencies

Dark theme variables of Ant Design.

Still being experimental, welcome to try out and help us to improve it.

Visit https://antdtheme.com/dark to preview.

Install

$ npm install @ant-design/dark-theme

Usage

import darkTheme from '@ant-design/dark-theme';

// webpack.config.js: less-loader
{
  loader: 'less-loader',
  options: {
    modifyVars: darkTheme,
  },
},

Use in Ant Design Pro: ant-design/ant-design-pro#2946

ant-design-dark-theme's People

Contributors

afc163 avatar chenshuai2144 avatar dependabot-preview[bot] avatar depfu[bot] avatar gzgogo avatar ycjcl868 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-design-dark-theme's Issues

Buffer报错

(node:8084) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(),
or Buffer.from() methods instead.

Problem about circular dependency

I clone antd and try to modify some component

Then, I found antd require antd-pro-merge-less
antd-pro-merge-less require @ant-design/dark-theme, and then @ant-design/dark-theme require antd.

Yeah, When i try to run node ./scripts/generate-color-less in antd, its throw

Error: Cannot find module 'antd/dist/dark-theme'

@ant-design/dark-theme not install antd, because its a devDependency.

How can i fix it?
Thanks for your reply

Is this ready to use?

Hey - the README indicates this is experimental software. Would using it in a project be fine? When will it be okay to use?

Looks great, by the way!

How to enable in Electerm?

Hello, I install theme two times but it's now visible in Electerm. How to import that theme?
Regards.

Changing theme dynamically

If I wanted to toggle my React app's theme by pressing a button in the app, without restarting my web server, would that be possible?

Website does not work?

Hi -- just wanted to preview the dark theme and there are quite a few errors....

The top bar:
Screen Shot 2020-01-12 at 5 52 40 PM

Tag dropdown:
Screen Shot 2020-01-12 at 5 54 11 PM

Form labels:
Screen Shot 2020-01-12 at 5 56 33 PM

Perhaps it's from this console error??:
Screen Shot 2020-01-12 at 5 55 29 PM

I'm a bit confused... there seems to be quite a few issues... Is this a public release or is this still in beta?

I am on Chrome Version 79.0.3945.117 (Official Build) (64-bit) and Mac OS Catalina. I cleared storage (like advised) and that didn't fix anything...

config-overrides.js 中直接配置darkTheme无法生效

`const {
override,
fixBabelImports,
addLessLoader,
} = require("customize-cra");

const darkTheme = require("@ant-design/dark-theme");

process.env.GENERATE_SOURCEMAP = "false"; //打包时去除map文件
module.exports = override(
fixBabelImports("import", {
libraryName: "antd",
libraryDirectory: "es",
style: true // change importing css to less
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: darkTheme
})
);`

Description List Title field text

The CSS for Description list title field needs to be changed for better contrast. It is barely visible with the dark theme.

Thank you.

menu-item-boundary-margin 为啥是0

翻了半天,终于找到是这个库导致变量不对,一开始以为是引用了compact.css,查找后发现是这里覆盖的,正常的antdcss和darkcss都设成8,只有compack才0

dark theme is overriding my classes

<Wrapper className="onyx-layout">

.onyx-layout { min-height: 100vh; background-color: #000; }

implemented dark-theme using craco

const CracoLessPlugin = require("craco-less");
const darkTheme = require("@ant-design/dark-theme");

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: darkTheme,
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
};

now it is.

Pasted_Image_8_2_20__9_55_AM

[RFC] add index.less

多一种引用方式。

写一个脚本,自动通过 index.ts -> index.less

Instructions when using with create-react-app and react-app-rewired

I am following the official instructions with create-react-app and have ant integrated.
I currently override them variables using the customize theme info given here
https://ant.design/docs/react/use-with-create-react-app#Customize-Theme
using addLessLoader and config-overrides.js

If I follow instructions the usage instructions for dark theme in this case they dont work.
import darkTheme from '@ant-design/dark-theme';

// webpack.config.js: less-loader
{
loader: 'less-loader',
options: {
modifyVars: darkTheme,
},
},

Can you please help.

Usage instructions for Yarn ?

Usage instructions for Yarn / react-app-rewired?

import darkTheme from '@ant-design/dark-theme';

Gives

SyntaxError: Unexpected token import

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.