Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Добавить возможность включать стили в проект без @font-face правил #1047

Closed
3 of 9 tasks
dkshichkovskiy opened this issue Nov 16, 2023 · 0 comments · Fixed by #1114
Assignees
Labels
priority:high level of urgency - high source:requested The tag indicates that the information or action being discussed was initiate state:ready ready for release (pass tested)
Milestone

Comments

@dkshichkovskiy
Copy link

Библиотека

  • @prizm-ui/core
  • @prizm-ui/components
  • @prizm-ui/install
  • @prizm-ui/icons
  • @prizm-ui/flag-icons
  • @prizm-ui/theme
  • @prizm-ui/charts
  • @prizm-ui/ast
  • @prizm-ui/nx-plugin

Предложение

В пакетах @prizm-ui/components, @prizm-ui/icons, @prizm-ui/theme имеются стили, которые необходимы для корректного отображения компонентов Prizm. Так же в этих стилях есть конструкции @font-face, регистрирующие нужные шрифты.

Например:

@font-face {
  font-family: 'Inter var';
  font-weight: 100 900;
  font-style: normal;
  font-named-instance: 'Regular';
  src: url('Inter-upright.var.woff2') format('woff2');
}

Т.к. в урле до шрифта естественно нет ни какого baseHref для текущего приложения, браузер пытается грузить данный шрифт относительно хоста. В итоге получаем 404 ошибку.

Необходима возможность включать в проект стили без регистрации самих шрифтов через @font-face. Чтобы регистрация шрифтов происходила в самом приложении, динамически подставляя нужный baseHref.

@dkshichkovskiy dkshichkovskiy changed the title [Feature] Добавить возможности включать стили в проект без @font-face правил [Feature] Добавить возможность включать стили в проект без @font-face правил Nov 16, 2023
@ZurabDev ZurabDev self-assigned this Nov 16, 2023
@ZurabDev ZurabDev added this to the 3.6.0 milestone Nov 16, 2023
@ZurabDev ZurabDev added source:requested The tag indicates that the information or action being discussed was initiate priority:high level of urgency - high labels Nov 17, 2023
@ZurabDev ZurabDev modified the milestones: 3.6.0, 3.6.1 Nov 28, 2023
@ZurabDev ZurabDev added the state:ready ready for release (pass tested) label Dec 1, 2023
ZurabDev added a commit that referenced this issue Dec 1, 2023
feat(icons): divided location and less #1047
This was referenced Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high level of urgency - high source:requested The tag indicates that the information or action being discussed was initiate state:ready ready for release (pass tested)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants