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

Unknown TOKEN #119

Closed
1 task done
7fresh opened this issue Nov 16, 2022 · 2 comments · Fixed by #171
Closed
1 task done

Unknown TOKEN #119

7fresh opened this issue Nov 16, 2022 · 2 comments · Fixed by #171
Assignees
Labels
bug Something isn't working

Comments

@7fresh
Copy link

7fresh commented Nov 16, 2022

Affected version

main branch

No same issues found

  • Yes, I search all issues but not found.

Bug type

CSS/DOM Style

Which frontend framework you are using.

Taro

Steps to reproduce

加载如下HTML即可复现

Code example

<!DOCTYPE html>
<html>
<head>
  <style>
    .tipButton {
      display: flex;
      justify-content: center;
      align-items: center;
      background: -webkit-linear-gradient(right, #00cf37 0, #45dc6d 100%);
      background: -o-linear-gradient(right, #00cf37 0, #45dc6d 100%);
      background: linear-gradient(270deg, #00cf37 0, #45dc6d 100%);
      border-radius: 20px;
      padding: 7px 28px;
      color: #fff;
      font-size: 14px;
      margin-top: 12px;
      height: 31px;
    }
  </style>
</head>
<body>
<div class="container">
  <button type="button" class="tipButton">我是按钮</button>
</div>
<script>
  console.log("Welcome to webf!");
</script>
</body>
</html>

Expected results

正常显示出带有渐变背景色的按钮

Actual results

仅显示出了文本内容

抛出异常如下

Performing hot restart...
Syncing files to device iPhone 14 Pro...
Restarted application in 623ms.
flutter: line 6, column 50: expected ), but found ,
\^[[34m  ╷\^[[0m
\^[[34m6 │\^[[0m       background: -webkit-linear-gradient(right, \^[[31m#\^[[0m00cf37 0, #45dc6d 100%);
\^[[34m  │\^[[0m \^[[31m                                                 ^<…>
flutter: Unknown TOKEN
#0      TokenKind.kindToString (package:webf/src/css/parser/token_kind.dart:473:9)
#1      Token.toString (package:webf/src/css/parser/token.dart:55:30)
#2      _StringBase._interpolate (dart:core-patch/string_patch.dart:853:19)
#3      CSSParser.identifier (package:webf/src/css/parser/parser.dart:1179:55)
#4      CSSParser.simpleSelectorTail (package:webf/src/css/parser/parser.dart:738:27)
#5      CSSParser.simpleSelector (package:webf/src/css/parser/parser.dart:712:14)
#6      CSSParser.simpleSelectorSequence (package:webf/src/css/parser/parser.dart:642:11)
#7      CSSParser.processSelector (package:webf/src/css/parser/parser.dart:578:26)
#8      CSSParser.processSelectorGroup (package:webf/src/css/parser/parser.dart:560:22)
#9      CSSParser._nestedSelector (package:webf/src/css/parser/parser.dart:519:20)
#10     CSSParser.processDeclarations (package:webf/src/css/parser/parser.dart:541:27)
#11     CSSParser.processRule (package:webf/src/css/parser/parser.dart:457:28)
<…>
flutter: WebF DevTool listening at ws://10.0.191.162:9222
flutter: Open Chrome/Edge and enter following url to your navigator:
flutter:     devtools://devtools/bundled/inspector.html?ws=10.0.191.162:9222
@7fresh 7fresh added the bug Something isn't working label Nov 16, 2022
@andycall
Copy link
Member

The version of 0.12.0 didn't have CSS selector supported. Try 0.13.0-beta.9

@7fresh
Copy link
Author

7fresh commented Nov 16, 2022

不好意思,是main分支

looseyi pushed a commit that referenced this issue May 29, 2024
[1.80.0][nezha][apm]: Report apm data to js sdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants