Giter VIP home page Giter VIP logo

Comments (37)

sagudev avatar sagudev commented on July 25, 2024 1

What about if we made Firefox based browser that act like Chrome (UI and autocomplete for now)

from materialfox.

Madis0 avatar Madis0 commented on July 25, 2024

You should clarify that you mean the autocomplete search results.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Unfortunately the autocomplete search results are not nested in the urlbar so they can't inherit its width but we should be able to do something about the overall style.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

What about if we made Firefox based browser that act like Chrome (UI and autocomplete for now)

I think that's a bit outside of the scope of this project. You have to consider whether something that involved is actually worth the outcome. I think it's a better idea to style it in a similar fashion to Chrome where possible, but where it can't be helped with a userChrome theme, do it the Firefox way.

A specific fork of Firefox for this theme would further restrict the target audience.

from materialfox.

Madis0 avatar Madis0 commented on July 25, 2024

@Eddi2015 You may be interested in this: NiklasGollenstede/re-style#21.

For context: reStyle is a Firefox extension for installing and managing userStyles, even the GUI ones on Firefox 57+. You may think of it as a feature Stylish used to have.

Though, the problem with this style specifically would be its scope (a big theme consisting of many files) so while possible, would probably prove to be quite difficult to make auto-updatable.

from materialfox.

sagudev avatar sagudev commented on July 25, 2024

I think we should easily change Firefox installer to install Material-Fox and all configs.

from materialfox.

sagudev avatar sagudev commented on July 25, 2024

@Eddi2015 With Firefox installer I mean Firefox stub installer, which downloads latest Firefox version. In stub installer we just need to add script to download latest Material-Fox and then extract it to Firefox profile folder and change configs that we need.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

I have made some preliminary modifications, and the current implementation is as follows:
my implementation

The biggest problem now is that urlbar changes its style before keystrokes, rather than that in chrome:
chrome

My CSS code of urlbar is as follows:

#urlbar[focused="true"],
#searchbar[focused="true"]
{
    height: 36px !important;
    background-color: var(--toolbar-field-focus-background-color) !important;
    border: 0px !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: rgba(0, 0, 0, 0.16) 2px 4px 6px 0px, rgba(0, 0, 0, 0.16) -2px 4px 6px 0px !important;
}

Obviously [focused="true"] shouldn't be used here, but I don't know what element selector to use.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

@GenkunAbe, how are you setting the urlbar results width? Mine always occupies the full width of the window.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

I noticed that although the resulting list is full width, the texts and urls inside are always aligned with the urlbar.

After inspecting the text elements, two variables were found to control the left and right padding: --item-padding-end and --item-padding-start, so my CSS code is:

#PopupAutoCompleteRichResult .autocomplete-richlistbox {
    margin: 0px var(--item-padding-end) 16px calc(var(--item-padding-start) + 22px) !important;
}

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Just came to the same realisation myself! That's some mighty fine spelunking. I'll take a look at this and see what I can come up with.

Also, you're probably looking for [open] instead of [focused].

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@muckSponge [open] is exactly what I'm looking for!

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

@GenkunAbe, does yours break when you add the searchbar to the nav bar? If I place it before the urlbar, --item-padding-start and --item-padding-end become unset and if I place it after the urlbar they have incorrect values.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@muckSponge Yes, mine is almost the same as yours, but when searchbar before urlbar and the width of browser window is wide enough, everything is normal again.
wide enough (--item-padding-start and --item-padding-end is right):
3
too narrow (--item-padding-start and --item-padding-end is unset):
4
after urlbar (--item-padding-start and --item-padding-end is incorrect):
5

I don't know what search bar can do but urlbar can't, so I never use search bar.

In addition, I noticed a clear border between urlbar and results list after changing [focused="true"] to [open].

from materialfox.

scorthyn avatar scorthyn commented on July 25, 2024

how can i add that to my theme? It looks great

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Tried this kind of tweak on macOS but it doesn't work because there's some kind of OS-styled shadow I can't get rid of:
image
Funnily enough, the screenshot doesn't actually look like it does on my screen. It's not capturing the rounded borders with weird dark artefacts.

from materialfox.

scorthyn avatar scorthyn commented on July 25, 2024

how can i add that to my theme? It looks great

I have made some preliminary modifications, and the current implementation is as follows:
my implementation

The biggest problem now is that urlbar changes its style before keystrokes, rather than that in chrome:
chrome

My CSS code of urlbar is as follows:

#urlbar[focused="true"],
#searchbar[focused="true"]
{
    height: 36px !important;
    background-color: var(--toolbar-field-focus-background-color) !important;
    border: 0px !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: rgba(0, 0, 0, 0.16) 2px 4px 6px 0px, rgba(0, 0, 0, 0.16) -2px 4px 6px 0px !important;
}

Obviously [focused="true"] shouldn't be used here, but I don't know what element selector to use.

where do I insert this code to apply the chrome like search ? :) thanks in advance

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

Tried this kind of tweak on macOS but it doesn't work because there's some kind of OS-styled shadow I can't get rid of:
<img alt="image"width="218"src="https://user-images.githubusercontent.com/5405629/51439508-a1561900-1d0f-11e9-924d-a484cfb1054e.png">
Funnily enough, the screenshot doesn't actually look like it does on my screen. It's not capturing the rounded borders with weird dark artefacts.

@muckSponge I guess my implementation should avoid this problem. Would you mind me to open a pull request? but I am not a designer or programmer, so the style will be a little ugly.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@scorthyn It takes a lot more code to achieve the above style, and it's not good enough yet, so you might want to wait for the project to update.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Go for it. Curious to see what your code looks like :) I've worked out a way to get the OS drop shadow to at least follow the border-radius contours but it's a bit of a hack job and doesn't allow you to adjust the drop shadow but it won't work like that on Windows because Windows doesn't enforce a drop shadow.

from materialfox.

scorthyn avatar scorthyn commented on July 25, 2024

Go for it. Curious to see what your code looks like :) I've worked out a way to get the OS drop shadow to at least follow the border-radius contours but it's a bit of a hack job and doesn't allow you to adjust the drop shadow but it won't work like that on Windows because Windows doesn't enforce a drop shadow.

Nice, working well here :D

screenshot_1

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Made some progress on this in a2cab3c (search-results branch). Only tested on macOS thus far and I know Windows won't have a drop shadow. Wanted to get it working on macOS first because it has some nasty limitations regarding the drop shadow (it is enforced by the OS with no way to modify or remove it). This means there has to be a 1-2px visible grey line separating the urlbar from the results, because nothing can be drawn in front of the results and the results have a shadow border forced on them.

image

I might add a smaller, darker 1px box-shadow around the urlbar just so it better matches the rather intense shadow cast by the OS. Won't be a perfect match because the OS shadow has some noise applied which is near-impossible to replicate and thebox-shadow fades out at the bottom.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@muckSponge I tested the code in search-results branch on Windows:
20190121174320

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Try the latest commit. Added a few Windows-specific tweaks. I think we just need to test Linux now to make sure it behaves like it does on macOS, otherwise I'll need to change some media queries.

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@muckSponge It's perfect now!

image

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Still quite a few tasks to complete to be able to close this issue. I'll list them below and tick them off once complete:

  • Hide identity box text and urlbar icons, and show favicon when #urlbar[open].
  • Disable pointer-events on identity box when #urlbar[open].
  • Replace search icon with Chrome search icon (it's a bit smaller).
  • Highlighted/focused search result behaves differently to Chrome (investigate changing colour or removing behaviour).
  • Search go icon might need to be removed or restyled.
  • Update searchbar styling (this is a rather big one).
  • Replace the default favicon with Chrome's globe icon.

from materialfox.

TowelBin avatar TowelBin commented on July 25, 2024

@muckSponge It's perfect now!
20190121174320

Can you share the code for that? right now I'm using the muckSponge version at a2cab3c on windows and the suggestions still overflow past the end of the URL bar.

Add this to the task list:

  • Show favicon of the first URL suggestion when typing to the left urlbar, or favicon of the search engine if the first suggestion is a search suggestion.
  • Replace the default favicon and globe icon with chrome's. Use this icon in the URL bar when a suggested website doesn't have a favicon
  • fine tune shadow and border radius

from materialfox.

GenkunAbe avatar GenkunAbe commented on July 25, 2024

@TowelBin The figure above is using the code at commit 7a23bea. However, you can also try the latest commit.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Can you share the code for that? right now I'm using the muckSponge version at a2cab3c on windows and the suggestions still overflow past the end of the URL bar.

Should be able to just grab the latest commit on master.

Show favicon of the first URL suggestion when typing to the left urlbar, or favicon of the search engine if the first suggestion is a search suggestion.

I'll have a look but I doubt this is possible because I don't think the urlbar element has access to a) the favicon of the search engine and b) the favicons of any of the suggestions shown in the search results box.

Replace the default favicon and globe icon with chrome's. Use this icon in the URL bar when a suggested website doesn't have a favicon

Should be doable. From what I understand the globe icon is the default favicon.

fine tune shadow and border radius

I'd say it's pretty close as it is. Only obvious thing is the shadow fades out between the urlbar and the search results box but without some serious over-engineering I can't do much about that (I tried for a few hours and gave up). Chrome's shadow might be slightly thicker on the sides but I don't have enough control with CSS shadows to replicate that without resorting to another over-engineered approach with 9 background-images or maybe a border-image.

image

from materialfox.

TowelBin avatar TowelBin commented on July 25, 2024

@TowelBin The figure above is using the code at commit 7a23bea. However, you can also try the latest commit.

broken
It doesn't seem to work on my system. In fact, the font color blends in with the background. It doesn't work like it does on your system. any ideas for why this is?

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Not sure. Are you using any lightweight themes or add-ons? What OS? Kinda looks like it thinks a dark lightweight theme is active so it's making the text white.

from materialfox.

TowelBin avatar TowelBin commented on July 25, 2024

Not sure. Are you using any lightweight themes or add-ons? What OS? Kinda looks like it thinks a dark lightweight theme is active so it's making the text white.

The only addon that I use that changes the theme is MaterialFox helper. I'm not using any lightweight themes. I think the problem is that I am using the default material theme. I don't know why it still overflows past the end of the urlbar though. I'm using windows 10

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

You should no longer need MaterialFox Helper because of recent changes to the theme which essentially accomplish the same thing (that is, applying Material light or dark colour palette and dark mode when private browsing). I'd disable or uninstall it and see if that helps but to be honest, having it enabled shouldn't really cause issues.

My suggestion is, try in a fresh profile (go to about:profiles) and if that doesn't work, try the different built in themes (default, light, dark) and let me know if one or more of them work and we might be able to narrow down the problem. Only other thing I can think of is the Windows theme. I've only tested recently on Windows 10 with a specific theme colour (darkish grey), so perhaps it is breaking if you use a very light or very dark colour.

from materialfox.

TowelBin avatar TowelBin commented on July 25, 2024

Dark theme - font color is gray and readable
Light theme - font color is the same as dark theme and is very readable
default theme - font color is very light gray (possibly the same as other themes?) and is not readable
All 3 themes have the search suggestions extend past the end of the url bar, but only when materialfox helper is enabled. changing the profile doesn't do anything.

I think I just need to change the font color manually. Try testing it again with the default theme.

from materialfox.

redoxeon avatar redoxeon commented on July 25, 2024

image

My search suggestions recently started looking like what's in the above image (from a previous comment) on a fresh install of firefox and just with MaterialFox (no additional themes installed) and this stuff for scrollbars:
https://github.com/endeavoursc/firefox-overlay-scrollbars-win10

I noticed that it started giving this behavior after updating to firefox 65 on windows 10.
I was using the default theme but have since been using the dark theme for now as that lets me read the search suggestions. It seems to me that the font color is always on light or white no matter which theme I'm using.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Worked out this bug was present in FF64 but masked by the different window colouring behaviour (which usually resulted in dark text on a light background). In FF65 this changed so often you'll get light text on a darker background now, and #PopupAutoCompleteRichResult was inheriting its colour from the parent, which is #main-window, hence it resulted in light colour text. I've removed the line which forces colour inheritance, tested on macOS and Windows 10 and seems to work fine. Should inherit the colour from the lightweight theme popup text colour variable now.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Ticked enough of the items off the list to call this done IMO. Still some work to do here and there but that's true of almost every part of the theme. Many fixes are currently in the popup-refresh branch, which I'll be pushing to master after a bit more testing but any further bugs can have their own issue.

from materialfox.

Related Issues (20)

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.